> 26 nov 2014 kl. 15:21 skrev Greg Stark <st...@mit.edu>:
> 
> I find it hard to believe the original premise of this thread. We knew
> there were some problems with OSX and FreeBSD but surely they can't be
> completely broken? What happens if you run "ls" with your locale set
> to something like fr_FR.UTF8 ? Does Apple not sell Macs in countries
> other than the US?

Hi,

On Mac OS X, ls -l is completely broken wrt utf-8 collation. Really. Horribly 
broken. The sorting it produces for the Swedish locale is just nonexisting, 
completely unaccetable, unusable. Compare it to sorting Z just after S or 
something, just to get the scale of how bad it is.

Application languages like Java have their own sorting. C based stuff like perl 
have their own way to do it. python, well depends on the version, haven't 
checked. C applications, well, it depends on if they use ICU or not, I guess. :)

Apples sells computers, but does not really promote using locales in 
Terminal.app... :)=

> 
> There were a number of problems with using ICU including the large
> dependency and the limitations of the iterator model but the main
> issue was that it's fundamentally a choice between being consistent
> with every other application on your system and being consistent with
> other Postgres databases running on other OSes. Most people run
> multiple applications on one OS, not many databases on many OSes on
> their own with no other applications. If Postgres used ICU then its
> output would be inconsistent with things like "sort" or "ls" or your
> application programming language's comparison operators.

I think most people don't care about getting postgresql collation consistent 
with sort or ls, they just want it to work properly for real life applications, 
so users who really don't care about ls or sort get the result they expect. Or, 
they give up and sort it in the application instead (=fail). But I guess that 
depends on which applications you use. We've used the patch for 8+ years. For 
us, Linux built-in collation would not have been enough either -- if memory 
serves it fails to sort 'ß' together with 'ss', and also fails to upper('ß') => 
'SS', which would be expected in the real world.




-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to