Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > CREATE CHARSET ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 15469 of 15987
Post > Topic >>

CREATE CHARSET would be nice feature

by michael.enke@[EMAIL PROTECTED] (Michael Enke) May 5, 2008 at 04:41 PM

Hi all,
I had to get data out of postgresql in CP852 encoding (internally stored
in UNICODE).
So I wrote my own encoding function and used CREATE DEFAULT ENCODING.
The problem with this is:
I can only use character set names which are known internally.
So I "misused" the LATIN2:

update pg_conversion set condefault=false where
conname='iso_8859_2_to_utf8';
update pg_conversion set condefault=false where
conname='utf8_to_iso_8859_2';
CREATE DEFAULT CONVERSION utf82cp852 FOR 'UNICODE' TO 'LATIN2' FROM
utf82cp852;
CREATE DEFAULT CONVERSION cp8522utf8 FOR 'LATIN2' TO 'UNICODE' FROM
cp8522utf8;

I do not understand why there is a CREATE CONVERSION without a CREATE
CHARSET
since everybody using it has to misuse existing charset names.

So, a nice feature would be to let user create their own character set
names.
In this case I could write:
CREATE CHARSET CP852;
CREATE DEFAULT CONVERSION utf82cp852 FOR 'UNICODE' TO 'CP852' FROM
utf82cp852;
CREATE DEFAULT CONVERSION cp8522utf8 FOR 'CP852' TO 'UNICODE' FROM
cp8522utf8;
and I would not need to update the pg_conversion table and I would be able
to use LATIN2 and CP852 in parallel.

Are there actually plans for this?

If this is not the case, is there a table which maps values for
pg_conversion.conforencoding / pg_conversion.contoencoding
to the names given as source_encoding/dest_encoding and where I can add
one row?

Regards,
Michael

-- 
Wincor Nixdorf International GmbH
Sitz der Gesellschaft: Paderborn
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach, Dr.
Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr.
DE44477193

Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der
richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist
nicht gestattet.

This e-mail may contain confidential information. If you are not the
intended recipient (or have received this e-mail in error) please notify
the sender immediately and destroy this e-mail. Any unauthorised copying,
disclosure or distribution of the material in this e-mail is strictly
forbidden.


-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 1 Posts in Topic:
CREATE CHARSET would be nice feature
michael.enke@[EMAIL PROTE  2008-05-05 16:41:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 17:25:59 CDT 2008.