pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gregory Stark <stark@enterprisedb.com>
To: Joe <dev@freedomcircle.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Medi Montaseri <montaseri@gmail.com>
Cc: Steve Midgley <public@misuse.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: UTF8 encoding and non-text data types
Date: Tue, 15 Jan 2008 10:31:22 +0000
Message-ID: <87odbnidmt.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <478BF2FD.60002@freedomcircle.net>
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>

"Joe" <dev@freedomcircle.net> 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!



view thread (15+ messages)  latest in thread

Message-ID: <87odbnidmt.fsf@oxford.xeocode.com>
Permalink:  ../87odbnidmt.fsf@oxford.xeocode.com/
Also on:    postgresql.org/message-id/87odbnidmt.fsf@oxford.xeocode.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: stark@enterprisedb.com, dev@freedomcircle.net, tgl@sss.pgh.pa.us, montaseri@gmail.com, public@misuse.org
  Subject: Re: UTF8 encoding and non-text data types
  In-Reply-To: <87odbnidmt.fsf@oxford.xeocode.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox