Strange UTF-8 behaviour
| От | Marco Ferretti |
|---|---|
| Тема | Strange UTF-8 behaviour |
| Дата | |
| Msg-id | 4149BAE5.1060406@jrc.it обсуждение исходный текст |
| Ответы |
Re: Strange UTF-8 behaviour
|
| Список | pgsql-general |
<small><font face="Century Gothic">Hi there all. <br /> I am quite new to Postgres, so forgive me if this question
seemsobvious. <br /><br /> I have created a database with the UTF-8 encoding (createdb cassa --encoding=UTF-8) .<br />
ThenI have made the following tests :<br /><br /></font></small><small><font face="Century Gothic">cassa=>
</font></small><small><fontface="Century Gothic">create table test(id varchar(5));<br /> cassa=> insert into test
values('12345');<br /> INSERT 178725 1<br /> cassa=> insert into test values ('123è');<br /> INSERT 178726 1<br />
cassa=>insert into test values ('1234è');<br /> ERROR: value too long for type character varying(5)<br /><br /><br
/>but if I try <br /> cassa=> select '#' || id || '#' from test;<br /> ?column?<br /> ----------<br /> #12345#<br
/> #123è#<br /> (2 rows)<br /><br /><br /> so, apparently the chars are stored the rigth way
(</font></small><small><fontface="Century Gothic"> #123è#) but when trying the query the è char is parsed as 2 chars
....<br/><br /> The database server version is 7.3.4 on a RedHat 9 machine ...<br /><br /> Any clue ?<br /><br /> Tia
<br/> Marco<br /></font></small><small><font face="Century Gothic"><br /><br /></font></small> <pre
class="moz-signature"cols="72">--
Ever noticed how fast windows run ? neither did I
</pre>
В списке pgsql-general по дате отправления: