Skip site navigation (1) Skip section navigation (2)

Re: UTF8 encoding and non-text data types

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Joe" <dev(at)freedomcircle(dot)net>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Medi Montaseri" <montaseri(at)gmail(dot)com>, "Steve Midgley" <public(at)misuse(dot)org>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: UTF8 encoding and non-text data types
Date: 2008-01-15 10:31:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
"Joe" <dev(at)freedomcircle(dot)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
  Ask me about EnterpriseDB's 24x7 Postgres support!

In response to


pgsql-sql by date

Next:From: Joost KraaijeveldDate: 2008-01-15 13:18:28
Subject: Is DATETIME an ANSI-SQL type?
Previous:From: JoeDate: 2008-01-14 23:40:45
Subject: Re: UTF8 encoding and non-text data types

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group