database encoding "WIN" -- Western or Cyrillic?

Поиск
Список
Период
Сортировка
От Preston Landers
Тема database encoding "WIN" -- Western or Cyrillic?
Дата
Msg-id 20050212223257.31668.qmail@web81101.mail.yahoo.com
обсуждение исходный текст
Ответы Re: database encoding "WIN" -- Western or Cyrillic?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-general
The PG documents on database character set encodings, such as here:

http://www.postgresql.org/docs/8.0/interactive/multibyte.html#CHARSET-TABLE

say that the "WIN" encoding in Postgresql means cp1251, which according
to Microsoft:

http://www.microsoft.com/globaldev/reference/wincp.mspx

cp1251 is Cyrillic / Russian:

http://www.microsoft.com/globaldev/reference/sbcs/1251.htm

Whereas cp1252 is Western, also called "Windows Latin-1", "Windows
ANSI", etc.

http://www.microsoft.com/globaldev/reference/sbcs/1252.htm

If the postgresql encoding "WIN" is intended to be Cyrillic 1251, then
it should be labeled as such in the docs to avoid confusion.  However,
that leaves the problem of how to create a "Western" 1252 encoded
database in Postgresql, since no encoding is specified for 1252.

Now in reality you can just use LATIN1 (8859-1) as if it were Win-1252
as long as all your clients are Windows and respect that convention.
The new characters in Windows 1252 are in spots where the original
Latin-1 didn't have anything.  Where you might get into trouble is when
the web app says "OK, I see the database is using Latin-1 aka
ISO-8859-1, so I'm going to tell the client web browser that it's
ISO-8859-1."  That may prevent the web browser from showing the correct
glyphs until the user manually selects codepage 1252.  I'm planning to
have my web app fudge it and always report LATIN1 as windows-1252 for
now.

If the postgresql encoding "WIN" really is intended to be Western
codepage 1252, then the docs (and possibly the code?) obviously need to
be fixed, then a separate Cyrillic WIN1251 encoding created.

thanks,
Preston Landers

(pibble @t yahoo dot com)



В списке pgsql-general по дате отправления:

Предыдущее
От: "Bogdan Tomchuk"
Дата:
Сообщение: SQL Injection possible on custom functions
Следующее
От: Vittorio De Martino
Дата:
Сообщение: Re: pg_dump warnings