Re: How can I add a new language localization(locale) support

From: joseph speigle <joe(at)hoveymotorcars(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How can I add a new language localization(locale) support
Date: 2004-06-23 00:02:29
Message-ID: 20040623000229.GA2223@www.sirfsup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

joe speigle

hello,
I am interested in this issue, too, and have lightly investigated how postgres internationalizes its applications. I have been asking for help with korean. However, it has all its problems solved. I had to ask in a korean forum
http://database.sarang.net/?inc=read&aid=5368&criteria=pgsql&subcrit=qna&id=&limit=20&keyword=&page=1
the locale interacts in some way with the internationalization code,
which point I haven't gotten to understand yet. internationalization code is scattered throughout the source code.
"hackers" et. al. say that to change the way it works would be a complete database rewrite. Meaning, to change encoding from database-wide and unchangeable to a column datatype.
AFAIK you can set in clients (e.g. libpq) the encoding in the connect string, then depending on what the encoding of the database is set to, it will do a conversion. If you look in your library directory, there are all kinds of *.so which are used for such conversions. If yours doesn't exist, you should analyze those conversions. I think the charsets are used, but you will have to provide yours from somewhere else. The conversion code is always encoding-specific depending on the ranges of values your language's atomic units take and the rules of the encoding.
I am unsure about whether or not indexing is possible with database-wide encodings. i raised that question on the korean forum, but received no really good answer. If you have some time, so do I, I would like to write a small source file which would extract teh column information from the tuple to see in what encoding it is stored in at which point, to see if my above guess is right.
Can somebody tell me if it were stored in unicode, and client encoding set to utf8 or unicode, if would be possible write datatype as C function, to allow comparisons and indexing of the character types, and has this been attempted?
In any case, I would like to write first that test code module.
--
joe speigle
www.sirfsup.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Zak McGregor 2004-06-23 00:17:50 Deleting all but one row of a list of non-uniques
Previous Message Hector Tinoco 2004-06-22 23:52:30 Installation problen On Solaris 8