Re: Unicode vs SQL_ASCII DBs
От | Tom Lane |
---|---|
Тема | Re: Unicode vs SQL_ASCII DBs |
Дата | |
Msg-id | 9463.1075734667@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Unicode vs SQL_ASCII DBs (Kris Jurka <books@ejurka.com>) |
Список | pgsql-general |
Kris Jurka <books@ejurka.com> writes: > On Mon, 2 Feb 2004, John Sidney-Woollett wrote: >> Except that in my test, the two differently encoded databases were in the >> same 7.4.1 cluster with the same locale, yet they sorted the *same* data >> differently - implying the encoding is a factor. > Right, note the "and you must choose an encoding that works with your > locale." clause. A SQL_ASCII encoding and a UTF-8 locale don't work. In practice, any given locale setting assumes a particular encoding and will not work if some other encoding is used. For instance, on recent Red Hat releases: $ locale -a | grep ^de_DE de_DE de_DE.iso88591 de_DE.iso885915@euro de_DE.utf8 de_DE.utf8@euro de_DE@euro I'm not too sure which encoding "de_DE" uses, but the other two are clearly named to reflect their expected encoding. It is really a bug that PG allows you to select incompatible locale and encoding settings. We'd fix it if we could figure out a portable way of determining which encoding a locale expects --- unfortunately the standard APIs for libc omit this information ... regards, tom lane
В списке pgsql-general по дате отправления: