linux locales to freebsd: symlink to make php setlocale() happy ?
Olivier Mueller
om-lists-bsd at omx.ch
Wed Nov 15 12:16:10 PST 2006
Bonjour,
While moving some more customers from a linux to a freebsd-based
hosting, like some others I had a problem with php pages using
setlocale().
According to 'locale -a', it looks like that for de_DE (german):
Linux (suse):
de_DE
de_DE.utf8
de_DE at euro
FreeBSD (6.1):
de_DE.ISO8859-1
de_DE.ISO8859-15
de_DE.UTF-8
And in the customers code, the call which hadn't worked anymore is:
setlocale (LC_ALL, 'de_DE at euro', 'de_DE', 'de', 'ge').
I could tell the customer to update his code and add "de_DE.ISO8859-1"
to his setlocale() list, but he will ask me "why isn't it like
before?" and on
systems with hundreds of virtualhosts (and different customers), this
can't
really be done.
So what would be the "cleanest" solution? Is there an options
somewhere
to add the "standard" de_DE-like label (xx_XX) to all languages?
Or should I use symlinks like:
[root at bsd /usr/share/locale]# ln -s de_DE.ISO8859-1 de_DE
Regards,
Olivier
More information about the freebsd-stable
mailing list