create database warning
Hi,
# psql83 template1
Password:
Welcome to psql83 8.3.5, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
template1=# drop database inf;
DROP DATABASE
template1=# create database inf with encoding 'windows-1251';
WARNING: could not determine encoding for locale "uk_UA.KOI8-U":
codeset is "KOI8-U"
DETAIL: Please report this to <pgsql-bugs@postgresql.org>.
CREATE DATABASE
template1=#
What's wrong with it?
--
Nick Strebkov
Public key: http://humgat.org/~nick/pubkey.txt
fpr: 552C 88D6 895B 6E64 F277 D367 8A70 8132 47F5 C1B6
Mykola Stryebkov wrote:
Hi,
# psql83 template1
Password:
Welcome to psql83 8.3.5, the PostgreSQL interactive terminal.Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quittemplate1=# drop database inf;
DROP DATABASE
template1=# create database inf with encoding 'windows-1251';
WARNING: could not determine encoding for locale "uk_UA.KOI8-U":
codeset is "KOI8-U"
DETAIL: Please report this to <pgsql-bugs@postgresql.org>.
CREATE DATABASE
template1=#What's wrong with it?
PostgreSQL does not support the KOI8-U encoding. You could try to use
uk_UA.utf8.
Peter Eisentraut wrote:
Mykola Stryebkov wrote:
template1=# create database inf with encoding 'windows-1251';
WARNING: could not determine encoding for locale "uk_UA.KOI8-U":
codeset is "KOI8-U"
DETAIL: Please report this to <pgsql-bugs@postgresql.org>.
CREATE DATABASE
template1=#What's wrong with it?
PostgreSQL does not support the KOI8-U encoding. You could try to use
uk_UA.utf8.
We get these complaints about missing KOI8-U support once in a while.
Attached is a patch to add KOI8-U support with UTF-8 conversion. It
should be enough to help this class of users, but more fancy features
such as conversion between KOI8U and KOI8R or KOI8U and various WIN
encodings is not there yet. I propose to add this patch to PostgreSQL 8.4.
Mykola, if you have a 8.3 or 8.4 source code lying around, please test
this patch.
Attachments:
koi8u-support.patchtext/x-diff; name=koi8u-support.patchDownload+327-6
diff -Nur ../cvs-pgsql/src/backend/utils/mb/wchar.c ./src/backend/utils/mb/wchar.c --- ../cvs-pgsql/src/backend/utils/mb/wchar.c 2009-01-30 10:35:27.000000000 +0200 +++ ./src/backend/utils/mb/wchar.c 2009-02-06 18:19:48.000000000 +0200 @@ -1373,6 +1373,7 @@ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* 31; PG_WIN1254 */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* 32; PG_WIN1255 */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* 33; PG_WIN1257 */ + {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* 34; PG_KOI8U */ {0, pg_sjis_mblen, pg_sjis_dsplen, pg_sjis_verifier, 2}, /* 34; PG_SJIS */ {0, pg_big5_mblen, pg_big5_dsplen, pg_big5_verifier, 2}, /* 35; PG_BIG5 */ {0, pg_gbk_mblen, pg_gbk_dsplen, pg_gbk_verifier, 2}, /* 36; PG_GBK */
I'm not convinced that putting the encoding numbers in these comments
is useful; if it is you need to update them. Or we could just remove
them.
regards, tom lane