Re: Strange UTF-8 behaviour - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Strange UTF-8 behaviour
Date
Msg-id 20040916163710.GA17027@dcc.uchile.cl
Whole thread Raw
In response to Strange UTF-8 behaviour  ("Marco Ferretti" <marco.ferretti@jrc.it>)
Responses Re: Strange UTF-8 behaviour
List pgsql-general
On Thu, Sep 16, 2004 at 06:10:13PM +0200, Marco Ferretti wrote:

> I am quite new to Postgres, so forgive me if this question seems
> obvious. <br>
> <br>
> I have created a database with the UTF-8 encoding  (createdb cassa
> --encoding=UTF-8) .<br>
> Then I have made the following tests :<br>

FWIW, I can't reproduce this using 7.3.6.  Is there anything special
about your 'e' character, or it's a plain 'e'?

$ createdb test --encoding=UTF-8
CREATE DATABASE
COMMENT

$ psql test
Welcome to psql 7.3.6, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

test=#  create table test (id char(5));
CREATE TABLE
test=# insert into test values ('1234e');
INSERT 16993 1
test=# create table test2 (id varchar(5));
CREATE TABLE
test=# insert into test2 values ('1234e');
INSERT 16996 1
test=# insert into test2 values ('123e');
INSERT 16997 1
test=# select '#' || id || '#', length(id) from test2;
 ?column? | length
----------+--------
 #1234e#  |      5
 #123e#   |      4
(2 rows)

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Escucha y olvidarás; ve y recordarás; haz y entenderás" (Confucio)


pgsql-general by date:

Previous
From: Jeff
Date:
Subject: Re: Postgres memory usage
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Problems with SPI memory management