Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 505E22E035B for ; Tue, 15 Jan 2008 06:31:42 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 15970-01 for ; Tue, 15 Jan 2008 06:31:37 -0400 (AST) Received: from oxford.xeocode.com (unknown [62.232.55.118]) by postgresql.org (Postfix) with ESMTP id 443D82E027D for ; Tue, 15 Jan 2008 06:31:37 -0400 (AST) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.67) (envelope-from ) id 1JEj4l-0001An-GI; Tue, 15 Jan 2008 10:31:23 +0000 To: "Joe" Cc: "Tom Lane" , "Medi Montaseri" , "Steve Midgley" , Subject: Re: UTF8 encoding and non-text data types In-Reply-To: <478BF2FD.60002@freedomcircle.net> (Joe's message of "Mon\, 14 Jan 2008 18\:40\:45 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX.sql" 1704) References: <20080113222706.73BE416DA2AB@mx1.hub.org> <478aea79.03098c0a.5f32.ffffa6e4SMTPIN_ADDED@mx.google.com> <8078a1730801141101j4bc0dc4chdffee5eaebdb99da@mail.gmail.com> <20080114201831.B34BA2E2CC4@postgresql.org> <8078a1730801141243o63676d02mdb1e3a539679f79f@mail.gmail.com> <7578.1200350483@sss.pgh.pa.us> <478BEA35.1010405@freedomcircle.net> <8278.1200353073@sss.pgh.pa.us> <478BF2FD.60002@freedomcircle.net> From: Gregory Stark Organization: EnterpriseDB Date: Tue, 15 Jan 2008 10:31:22 +0000 Message-ID: <87odbnidmt.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/124 X-Sequence-Number: 29977 "Joe" writes: > Tom Lane wrote: >> Oh? Interesting. But even if we wanted to teach Postgres about that, >> wouldn't there be a pretty strong risk of getting confused by Arabic's >> right-to-left writing direction? Wouldn't be real helpful if the entry >> came out as 4321 when the user wanted 1234. Definitely seems like >> something that had better be left to the application side, where there's >> more context about what the string means. >> > The Arabic language is written right-to-left, except ... when it comes to > numbers. I don't think that matters anyways. Unicode strings are always in "logical" order, not display order. Displaying the string in the right order is up to the display engine in the Unicode world-view. I'm not sure what to think about this though. It may be that Arabic notation are close enough that it would be straightforward (IIRC decimal notation was invented in the Arabic world after all). But other writing systems have some pretty baroque notations which would be far more difficult to convert. If anything I would expect this kind of conversion to live in the same place as things like roman numerals or other more flexible formatting. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support!