Re: [pgsql-hackers-win32] UNICODE/UTF-8 on win32

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [pgsql-hackers-win32] UNICODE/UTF-8 on win32
Дата
Msg-id 200502242345.j1ONjv627317@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [pgsql-hackers-win32] UNICODE/UTF-8 on win32  ("Magnus Hagander" <mha@sollentuna.net>)
Ответы Re: [pgsql-hackers-win32] UNICODE/UTF-8 on win32  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Magnus Hagander wrote:
> The installer does not permit it, but initdb lets you do anything yuo
> want - I think that's where we are. If you know what you're doing, you
> can use it by manually initdbing.
>
> There is no such thing as "unicode locale". Unicode (UTF8) is an
> encoding, that has to be paired with a locale. I assume you mean C
> locale.

Oh, sorry.  So there is no ordering in Unicode?  No wonder some
languages can't use Unicode effectively.  I can see why ordering is
meaningless for creating a document that is just displayed but important
for a database.

I have added the last sentence to the TODO list:

        o Disallow encodings like UTF8 which PostgreSQL supports
          but the operating system does not (already disallowed by
          pginstaller)

          To fix UTF8, the data needs to be converted to UTF16 and then
          the Win32 wcscoll() can be used, and perhaps other functions
          like towupper().  However, UTF8 already works with normal
          locales but provides no ordering.

>
> While UPPER/LOWER does not matter, sort order does - for indexes if
> nothing else. I'm unsure if this works - I think I read reports about
> itn ot working, but I haven't tried it out myself.

I assume C just compares the bytes, meaning equality comparisons are
fine, but greater/less than is consistent but meaningless.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Gavin Sherry
Дата:
Сообщение: Re: Where are we on stored procedures?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: psql: recall previous command?