vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Charlie Savage wrote: > Hope this is the right place for this post... > > I'm been trying out the msvc++ build scripts for postgresql 8.2.4 on > my development laptop (using window xp pro). > > I noticed the sort orders of queries changed. Investigating more, > encodings don't seem to be working as expected. > > Using a MSVC++ build: > > > CREATE DATABASE test1 WITH ENCODING = 'utf8'; > > > show all > > "lc_collate";"English_United States.1252" > "lc_ctype";"English_United States.1252" > "lc_messages";"C" > "lc_monetary";"C" > "lc_numeric";"C" > "lc_time";"C" > > Using a MSYS build: > > > CREATE DATABASE test1 WITH ENCODING = 'utf8'; > > > show all > > "lc_collate";"en_US.UTF-8" > "lc_ctype";"en_US.UTF-8" > "lc_messages";"C" > "lc_monetary";"C" > "lc_numeric";"C" > "lc_time";"C" > > In both cases, the database clusters were created like this: > > initdb ---locale=c --encoding=utf8; > > That seems most unlikely - without the superfluous dash it should set both lc_collate and lc_ctype to C. Please try the following in both cases: initdb --no-locale --encoding=utf8 data pg_controldata data | grep LC_ If it doesn't show this: LC_COLLATE: C LC_CTYPE: C then that's a bug. Or if after that you connect to the instance and "show lc_collate" or "show lc_ctype" don't likewise show C then that's a bug. Are you by any chance loading a library that calls setlocale() ? cheers andrew ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate |
| ||||
| On Wed, Aug 29, 2007 at 09:49:03PM -0600, Charlie Savage wrote: > Hmm. Its postgresql 8.2.4 + tsearch2 + tree + postgis. postgis in > turn loads proj4 and geos. I grepped through those 3 libraries source > code and did not find any calls to setlocale. So I don't think so. > > So now I'm confused - if I go back to my other cluster that I originally > wrote about (created with the MSVC++ build also) and create a database > it has a different lc_collate (English_United States.1252"). Could this > be from the dump/reload? Shouldn't be - it's set a initdb and not at reload. My guess would be that you somehow missed the locale parameter on that initdb call - I don't suppose you still have it in yuor commandline history? :_) There should be zero difference in what initdb does, and I've never seen anything like that other than when I missed some option to it. //Magnus ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |