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

Re: locales and encodings on Windows

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>,"Thomas Kellerer" <spam_eater(at)gmx(dot)net>,<pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: locales and encodings on Windows
Date: 2004-12-22 17:40:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers-win32
> > > >>> [about PG not supporting Unicode on Windows]
> > > >> 
> > > >> PostgreSQL uses the OS functinos to do locale 
> handling. The other 
> > > >> databases usually implement their own (or use a 
> library that does 
> > > >> it, but they do not rely on the OS)
> > > 
> > > > Being a developer myself I can understand this reason, 
> but in the 
> > > > PG context I'm a User I not having Unicode support is my eyes a 
> > > > very big deficiency which gives the whole Win32 a 
> semi-professional "touch".
> > > 
> > > > Unicode is something very important and I do hope this will be 
> > > > solved in on of the next releases.
> > > 
> > > [ shrug... ]  It can't be too important to Windows users, since 
> > > their platform doesn't support it.
> > 
> > And what solution options do we have?  Is bundling our own Unicode 
> > library something we even want to consider?  I would think not.
> If the Win32 Unicode implemetation is buggy, can we work 
> around the bugs in our code?

The implementation is not buggy.
The implementation of strcoll() etc *does not exist* for UTF-8.
There is a perfectly working Unicode system on Windows - it has been
there since Windows NT 3.1. *Every* API in Windows is unicode
internally. With Unicode in this case, MS means UTF-16. 
How do other programs do? They convert their strings to UTF-16 and use
the unicode functions in the OS. UTF8 support only exists in the two
functinos used to convert to/from UTF-16.

That's at least how I understand it. I'm not a locale/encoding expert
though, so I could be wrong :)

Perhaps an emulation layer could be written for port/win32. I can't
really say, because I don't know these things well enough (on any



pgsql-hackers-win32 by date

Next:From: Andreas PflugDate: 2004-12-22 18:35:58
Subject: Re: locales and encodings on Windows
Previous:From: Bruce MomjianDate: 2004-12-22 17:28:03
Subject: Re: locales and encodings on Windows

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