View Issue Details

IDProjectCategoryView StatusLast Update
0000411Other Unix Portpublic2022-05-14 06:55
Reporterjep Assigned Topsmedley  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionwon't fix 
PlatformeComStationOSOS/2OS Version2.0 rc6
Summary0000411: PostGreSQL: Not possible to select encoding as UTF8 on the dbserver
DescriptionShould be possible to set UTF-8 as encoding on the server:
http://www.postgresql.org/docs/current/static/multibyte.html

LATIN1 (ISO8891-1) is by the way not compatible with CP850 for non english langauges as it is equivalent to CP1252/CP1004.
Steps To Reproduceinitdb --encoding=UTF8
LATIN1 is known to not be compatible....
TagsNo tags attached.

Activities

jep

2010-04-19 17:30

reporter   ~0001540

[C:\PROGRAMS\PGSQL\BIN]initdb -D C:\U8DB --encoding=UTF8 --locale=sv_SE.UTF8
short_version = 8.4
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale sv_SE.UTF8.
could not determine encoding for locale "sv_SE.UTF8": codeset is "IBM-1208"
could not determine encoding for locale "sv_SE.UTF8": codeset is "IBM-1208"
The default text search configuration will be set to "swedish".

creating directory C:/U8DB ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
creating configuration files ... ok
creating template1 database in C:/U8DB/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... WARNING: could not determine encoding for lo
cale "sv_SE.UTF8": codeset is "IBM-1208"
DETAIL: Please report this to <pgsql-bugs@postgresql.org>.
WARNING: could not determine encoding for locale "sv_SE.UTF8": codeset is "IBM-
1208"
DETAIL: Please report this to <pgsql-bugs@postgresql.org>.
ok
copying template1 to postgres ... WARNING: could not determine encoding for loc
ale "sv_SE.UTF8": codeset is "IBM-1208"
DETAIL: Please report this to <pgsql-bugs@postgresql.org>.
WARNING: could not determine encoding for locale "sv_SE.UTF8": codeset is "IBM-
1208"
DETAIL: Please report this to <pgsql-bugs@postgresql.org>.
ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

    postgres -D C:/U8DB
or
    pg_ctl -D C:/U8DB -l logfile start

psmedley

2010-04-19 21:44

administrator   ~0001541

Try using just:
initdb -D C:\U8DB --encoding=UTF8 --locale=sv_SE

jep

2010-04-25 09:32

reporter   ~0001546

That is unfortunately not possible as mentioned vaguely in "Steps To Reproduce".

[C:\PROGRAMS\PGSQL\BIN]initdb --encoding=UTF8 --locale=sv_SE --pgdata=D:\UDB
Initializing database...one moment please.
short_version = 8.4
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale sv_SE.
initdb: encoding mismatch
The encoding you selected (UTF8) and the encoding that the
selected locale uses (LATIN1) do not match. This would lead to
misbehavior in various character string processing functions.
Rerun initdb and either do not specify an encoding explicitly,
or choose a matching combination.
Couldn't initalize database

psmedley

2010-04-25 10:18

administrator   ~0001547

ok i will try do some more testing.

I know that initdb --encoding=UTF8 --locale=de_DE definitely does work..

jep

2011-04-03 08:02

reporter   ~0001868

I've now tested this again and also tried
--encoding=UTF8 --locale=de_DE
but get the same results.
I think it has something to do with that they don't know anything about the codepage IBM-1208.

jep

2011-09-11 12:10

reporter   ~0001972

This only work (partially) if i enable
client_encoding = sql_ascii
as it doesn't refuse conenctions with OpenOffice Base and allow me to connect with unixODBC. Intead it output:
========= postgres output =========
ERROR: column pt1.tgconstrname does not exist at character 807
STATEMENT: SELECT pt.tgargs, pt.tgnargs, pt.tgdef
errable, pt.tginitdeferred, pp1.proname,
pp2.proname, pc.oid, pc1.oid, pc1.reln
ame, pn.nspname FROM pg_catalog.pg_class pc, pg_catal
og.pg_proc pp1, pg_catalog.pg_proc pp2, pg_catal
og.pg_trigger pt1, pg_catalog.pg_trigger pt2, pg_catal
og.pg_proc pp, pg_catalog.pg_trigger pt, pg_catalog.pg_cl
ass pc1, pg_catalog.pg_namespace pn, pg_catalog.pg_na
mespace pn1 WHERE pt.tgrelid = pc.oid AND pp.oid = pt.tgfoid AND pt1.tgcon
strrelid = pc.oid AND pp1.oid = pt1.tgfoid AND pt2.tgfoid = pp2.oid AND pt2.tgco
nstrrelid = pc.oid AND ((pc.relname='word') AND (pn1.oid = pc.relnamespace) AND
(pn1.nspname = 'public') AND (pp.proname LIKE '%ins') AND (pp1.proname LIKE '%up
d') AND (pp2.proname LIKE '%del') AND (pt1.tgrelid=pt.tgconstrrelid) AND (pt1.tg
constrname=pt.tgconstrname) AND (pt2.tgrelid=pt.tgconstrrelid) AND (pt2.tgconstr
name=pt.tgconstrname) AND (pt.tgconstrrelid=pc1.oid) AND (pc1.relnamespace=pn.oi
d))
==========

Where they (PostgreSQL) reluctant to add IBM-xyz codepages btw?

psmedley

2011-09-12 09:42

administrator   ~0001973

I haven't asked the postgresql guys to add IBM codepages... I can't see them doing anything to include os2 support in the base code... (based on comments in the postgresql irc channel when I mentioned os2 builds)

jep

2011-09-15 14:51

reporter   ~0001975

What has to be done as mentioned in the message?
http://archives.postgresql.org/pgsql-hackers/2011-04/msg00284.php

psmedley

2011-09-25 09:33

administrator   ~0002002

In the above the pg guys said they'd integrate changes if someone could add an os2 machine to the buildfarm. This isn't something I currently have time to do

psmedley

2022-05-14 06:55

administrator   ~0004261

Sorry, I'm no longer maintaining this port.

Issue History

Date Modified Username Field Change
2010-04-19 13:41 jep New Issue
2010-04-19 17:30 jep Note Added: 0001540
2010-04-19 21:44 psmedley Note Added: 0001541
2010-04-25 09:32 jep Note Added: 0001546
2010-04-25 10:18 psmedley Note Added: 0001547
2011-04-03 08:02 jep Note Added: 0001868
2011-09-11 12:10 jep Note Added: 0001972
2011-09-12 09:42 psmedley Note Added: 0001973
2011-09-15 14:51 jep Note Added: 0001975
2011-09-25 09:33 psmedley Note Added: 0002002
2022-05-14 06:55 psmedley Assigned To => psmedley
2022-05-14 06:55 psmedley Status new => resolved
2022-05-14 06:55 psmedley Resolution open => won't fix
2022-05-14 06:55 psmedley Note Added: 0004261