Howto install new locale (was: Howto convert UTF-8 to lower/uppercase)

Howto install new locale (was: Howto convert UTF-8 to lower/uppercase)

Post by Michael Enk » Thu, 09 May 2002 21:13:47

I have a machine with redhat 6.2.
The version of locale is 2.1.3
This version has (at least at this machine)
no locale de_DE.utf8 or any other *.utf8
But I need to do conversion of UTF-8 chars (lower<->upper).
Is it possible to install a new locale? (I want to avoid to install new version of locale if possible.)
I took the directory de_DE.utf8 from a machine
with version 2.2.2, "locale -a" did show me de_DE.utf8
but if I call setlocale() in my program the behaviour is like de_DE.
Any ideas?



1. Howto convert UTF-8 to lower/uppercase?

I have two bytes, representing the german ? (lowercase "o umlaut") in UTF-8, 2 bytes:
I have to convert this to uppercase, the same encoding.
I have tried the following:
mbsrtowcs          -> convert bytes to wide chars
wctrans("toupper") -> to get a descriptor
towctrans          -> to convert to uppercase
wcsrtombs          -> to convert wide chars to byte

I exported LC_CTYPE to UTF-8
But I get an error at mbsrtowcs: Invalid or incomplete multibyte or wide character
If I have only ASCII, it works.
Does anybody have experience with this?


2. kernel question

3. How to convert uppercase filenames to lower case (Answer!)

4. SUSE Xserver for Diamond Fire GL 1000 Pro : help me!

5. CONVERTING lower-case to upper-case filenames?

6. umount - resource busy

7. New Howto/mini-howto/man page/rfc/irc/book site

8. modules in 2.2.6

9. New USB memory-stick howto: Flash-Memory-HOWTO

10. Submission: HOWTO: new ADSL mini-howto ver 0.81 released

11. New HOWTO....HOWTO-Hose-RedHat-Installation (help!)

12. POSIX.2 utilities in UTF-8 based locale?

13. UTF-8 locales?