I am a bit confused. Neither de_DE.ISO-8859-1 nor de_DE.ISO8859-1 work properly in all cases. > setenv LANG de_DE.ISO8859-1 > echo abcdef uvwxyz | tr '[a-z]' '[A-Z]' ABCDEF ?WXY?] > setenv LANG de_DE.ISO-8859-1 > echo abcdef uvwxyz | tr '[a-z]' '[A-Z]' ABCDEF UVWXYZ > perl perl: warning: Setting locale failed. [lot of indignation about locale settings] I am suspicious that de_DE.UTF-8 would work correct with most software. Is it the only solution to don't use localization currently at all or should it be my ambition to fix this? What should be the correct value? I would prefer the notation "ISO-8859-1", but even the almighty perl does not. Regards Bj?rn
On Sat, Jan 22, 2005 at 04:52:45PM +0100, Bj?rn K?nig wrote:> I am a bit confused. Neither de_DE.ISO-8859-1 nor > de_DE.ISO8859-1 work properly in all cases. > > > setenv LANG de_DE.ISO8859-1 > > echo abcdef uvwxyz | tr '[a-z]' '[A-Z]' > ABCDEF ?WXY?]For better or worse, this is not the correct way to perform case conversion in non-ASCII locales on FreeBSD 5 and later. See the COMPATIBILITY section of the tr(1) manpage for more information.> > > setenv LANG de_DE.ISO-8859-1 > > echo abcdef uvwxyz | tr '[a-z]' '[A-Z]' > ABCDEF UVWXYZ > > perl > perl: warning: Setting locale failed. > [lot of indignation about locale settings]FreeBSD uses the name de_DE.ISO8859-1 instead of de_DE.ISO-8859-1. Most base system utilities don't complain if LANG or the related LC_* variables are invalid.> > I am suspicious that de_DE.UTF-8 would work correct > with most software. Is it the only solution to don't > use localization currently at all or should it be my > ambition to fix this? What should be the correct > value? I would prefer the notation "ISO-8859-1", but > even the almighty perl does not.Setting LANG to de_DE.ISO8859-1 should work. The alternative is UTF-8, which is understood by most text-processing utilities in the base system (ls, wc, grep, sed, ...). However, at this stage neither sh nor vi work correctly with UTF-8, so you would need to replace these with (for example) bash and vim. Tim
On Saturday, 22. January 2005 16:52, Bj?rn K?nig wrote:> I am a bit confused. Neither de_DE.ISO-8859-1 nor > de_DE.ISO8859-1 work properly in all cases. > > > setenv LANG de_DE.ISO8859-1 > > echo abcdef uvwxyz | tr '[a-z]' '[A-Z]' > > ABCDEF ?WXY?]This is the correct locale name, but don't use tr like that, you can't rely on that to work correctly with charsets which aren't symmetric in lower&uppercase characters (it used to work at some point for the ISO8859-1 [5] locales but ceased after a POSIX related modification to tr). Use tr [:lower:] [:upper:] instead. -- ,_, | Michael Nottebrock | lofi@freebsd.org (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20050122/b2189ed7/attachment.bin
Tim Robbins wrote:>For better or worse, this is not the correct way to perform case conversion >in non-ASCII locales on FreeBSD 5 and later. See the COMPATIBILITY section >of the tr(1) manpage for more information. >Thanks a lot for this hint. I will pay more attention to this section. Regards Bj?rn