Lists: | pgsql-bugspgsql-hackers |
---|
From: | Mykola Stryebkov <mykola(dot)stryebkov(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | create database warning |
Date: | 2009-02-06 00:49:48 |
Message-ID: | 70DF754F-A856-48C0-AC5E-AE76D5D98668@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs pgsql-hackers |
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(at)postgresql(dot)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
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Mykola Stryebkov <mykola(dot)stryebkov(at)gmail(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: create database warning |
Date: | 2009-02-06 14:14:56 |
Message-ID: | 498C45E0.3070903@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs pgsql-hackers |
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 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(at)postgresql(dot)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.
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Mykola Stryebkov <mykola(dot)stryebkov(at)gmail(dot)com> |
Subject: | KOI8-U support (was Re: [BUGS] create database warning) |
Date: | 2009-02-06 17:37:45 |
Message-ID: | 498C7569.3060204@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs pgsql-hackers |
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(at)postgresql(dot)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.
Attachment | Content-Type | Size |
---|---|---|
koi8u-support.patch | text/x-diff | 13.1 KB |
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | PG Hackers <pgsql-hackers(at)postgresql(dot)org>, Mykola Stryebkov <mykola(dot)stryebkov(at)gmail(dot)com> |
Subject: | Re: KOI8-U support (was Re: [BUGS] create database warning) |
Date: | 2009-02-06 21:40:00 |
Message-ID: | 27578.1233956400@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs pgsql-hackers |
> 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