Thank you for your response.... Is a user able to change locales without rebuilding the filesystem?
If so, then if a user changes locales (for example from Latin-1 to UTF8), does this mean that all existing filenames [with accented letters] suddenly become undisplayable because what was valid as a Latin-1 string is no longer valid as UTF8; or is there some more persistent concept of "the locale of a filesystem" that protects against this problem? - Martin Kochanski. At 21:20 18/09/02 +0200, you wrote: >Martin Kochanski writes: > >> how can a poor innocent server discover enough about the >> context in which it is running to know what filename it has to >> use so that a >> user who lists a file directory will see "R�ve" on his screen? > >Since it depends on the user's locale, you'll have to convert the >filename from the given encoding to the user's locale encoding. >Start out with > > const char *given_encoding = "UTF-8"; > // or "UTF-16", depends on what you have > const char *localedependent = ""; > // shortcut for glibc or libiconv > iconv_t cd = iconv_open (localedependent, given_encoding); > ... > >Bruno > > >______________________________________________________________________________ >Die clevere Geldreserve: der DiBa-Privatkredit. Funktioniert wie ein Dispo, >ist aber viel gunstiger! Alle Infos: http://diba.web.de/?mc=021104 > >-- >Linux-UTF8: i18n of Linux on all levels >Archive: http://mail.nl.linux.org/linux-utf8/ > > > -- Linux-UTF8: i18n of Linux on all levels Archive: http://mail.nl.linux.org/linux-utf8/
