Re: [GENERAL] psql weird behaviour with charset encodings
От | hgonzalez@gmail.com |
---|---|
Тема | Re: [GENERAL] psql weird behaviour with charset encodings |
Дата | |
Msg-id | 000e0cd64822e8870604861d0168@google.com обсуждение исходный текст |
Ответ на | Re: [GENERAL] psql weird behaviour with charset encodings (hernan gonzalez <hgonzalez@gmail.com>) |
Ответы |
Re: [GENERAL] psql weird behaviour with charset encodings
|
Список | pgsql-hackers |
Well, I finally found some related -rather old- issues in Bugzilla (glib)<br /><br />http://sources.redhat.com/bugzilla/show_bug.cgi?id=6530<br />http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=208308<br/>http://sources.redhat.com/bugzilla/show_bug.cgi?id=649<br /><br/>The last explains why they do not consider it a bug:<br /><br /> ISO C99 requires for %.*s to only write completecharacters that fit below the<br /> precision number of bytes. If you are using say UTF-8 locale, but ISO-8859-1<br/> characters as shown in the input file you provided, some of the strings are<br /> not valid UTF-8 strings,therefore sprintf fails with -1 because of the<br /> encoding error. That's not a bug in glibc.<br /><br />It's clear,though it's also rather ugly, from a specification point of view (we must <br />count raw bytes for the width field,but also must decode the utf8 chars for finding <br />character boundaries). I guess we must live with that. <br /><br/>Hernán J. González
В списке pgsql-hackers по дате отправления: