Обсуждение: unicode support vs native install

Поиск
Список
Период
Сортировка

unicode support vs native install

От
"Eric J. Schwarzenbach"
Дата:
The Running & Installing PostgreSQL On Native Windows FAQ has an item on
not being able to use unicode

http://pginstaller.projects.postgresql.org/FAQ_windows.html#2.6

"/Because Postgres relies on the operating system for some string
related functions, the OS needs to support the same encoding as the one
that is used as the database encoding. Unfortunately, Windows does not
support some encodings that are available as server-side encodings for PG."

/My understanding is the 8.0 windows installer prevents istalling utf-8
but you can get around it with initdb if you know what your doing.
Apparently only some things related to utf-8 data will be broken like
sort ordering.
/
/Does this apply to Cygwin installs of PostgreSQL as well?

Thanks,

Eric



Re: unicode support vs native install

От
Bruce Momjian
Дата:
Eric J. Schwarzenbach wrote:
> The Running & Installing PostgreSQL On Native Windows FAQ has an item on
> not being able to use unicode
>
> http://pginstaller.projects.postgresql.org/FAQ_windows.html#2.6
>
> "/Because Postgres relies on the operating system for some string
> related functions, the OS needs to support the same encoding as the one
> that is used as the database encoding. Unfortunately, Windows does not
> support some encodings that are available as server-side encodings for PG."
>
> /My understanding is the 8.0 windows installer prevents istalling utf-8
> but you can get around it with initdb if you know what your doing.
> Apparently only some things related to utf-8 data will be broken like
> sort ordering.
> /
> /Does this apply to Cygwin installs of PostgreSQL as well?

Yes, it does.  The problem is that we only support UTF8 and Windows is
UTF16.  If you don't care about character ordering you can initdb with
locale of C and use Unicode as your encoding.

--
  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

Re: unicode support vs native install

От
Bruce Momjian
Дата:
pgman wrote:
> Eric J. Schwarzenbach wrote:
> > The Running & Installing PostgreSQL On Native Windows FAQ has an item on
> > not being able to use unicode
> >
> > http://pginstaller.projects.postgresql.org/FAQ_windows.html#2.6
> >
> > "/Because Postgres relies on the operating system for some string
> > related functions, the OS needs to support the same encoding as the one
> > that is used as the database encoding. Unfortunately, Windows does not
> > support some encodings that are available as server-side encodings for PG."
> >
> > /My understanding is the 8.0 windows installer prevents istalling utf-8
> > but you can get around it with initdb if you know what your doing.
> > Apparently only some things related to utf-8 data will be broken like
> > sort ordering.
> > /
> > /Does this apply to Cygwin installs of PostgreSQL as well?
>
> Yes, it does.  The problem is that we only support UTF8 and Windows is
> UTF16.  If you don't care about character ordering you can initdb with
> locale of C and use Unicode as your encoding.
>

Uh, this is assuming that Cygwin doesn't add UTF8 to Windows.  I don't
think it does, but I am not sure.

--
  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

Re: unicode support vs native install

От
Mike G
Дата:
I believe cygwin supports only the C locale.

If I remember correctly it is mentioned either in the README or FAQ that
is included with the postgresql-cygwin package.


Mike


On Sat, 2005-03-12 at 19:25, Bruce Momjian wrote:
> pgman wrote:
> > Eric J. Schwarzenbach wrote:
> > > The Running & Installing PostgreSQL On Native Windows FAQ has an item on
> > > not being able to use unicode
> > >
> > > http://pginstaller.projects.postgresql.org/FAQ_windows.html#2.6
> > >
> > > "/Because Postgres relies on the operating system for some string
> > > related functions, the OS needs to support the same encoding as the one
> > > that is used as the database encoding. Unfortunately, Windows does not
> > > support some encodings that are available as server-side encodings for PG."
> > >
> > > /My understanding is the 8.0 windows installer prevents istalling utf-8
> > > but you can get around it with initdb if you know what your doing.
> > > Apparently only some things related to utf-8 data will be broken like
> > > sort ordering.
> > > /
> > > /Does this apply to Cygwin installs of PostgreSQL as well?
> >
> > Yes, it does.  The problem is that we only support UTF8 and Windows is
> > UTF16.  If you don't care about character ordering you can initdb with
> > locale of C and use Unicode as your encoding.
> >
>
> Uh, this is assuming that Cygwin doesn't add UTF8 to Windows.  I don't
> think it does, but I am not sure.

Re: unicode support vs native install

От
Reini Urban
Дата:
Bruce Momjian schrieb:
> pgman wrote:
>>Eric J. Schwarzenbach wrote:
>>
>>>The Running & Installing PostgreSQL On Native Windows FAQ has an item on
>>>not being able to use unicode
>>>
>>>http://pginstaller.projects.postgresql.org/FAQ_windows.html#2.6
>>>
>>>"/Because Postgres relies on the operating system for some string
>>>related functions, the OS needs to support the same encoding as the one
>>>that is used as the database encoding. Unfortunately, Windows does not
>>>support some encodings that are available as server-side encodings for PG."
>>>
>>>/My understanding is the 8.0 windows installer prevents istalling utf-8
>>>but you can get around it with initdb if you know what your doing.
>>>Apparently only some things related to utf-8 data will be broken like
>>>sort ordering.
>>>/
>>>/Does this apply to Cygwin installs of PostgreSQL as well?
>>
>>Yes, it does.  The problem is that we only support UTF8 and Windows is
>>UTF16.  If you don't care about character ordering you can initdb with
>>locale of C and use Unicode as your encoding.
>
> Uh, this is assuming that Cygwin doesn't add UTF8 to Windows.  I don't
> think it does, but I am not sure.

cygwin supports no multi-byte charsets because it uses only newlib,
not the windows string c runtime (MSVCRT.DLL), which is multi-byte
compatible.

I didn't check so far how postgresql works around multi-byte issues.
Maybe it applies to cygwin as well.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban
http://phpwiki.org