morning Thomas, Hans-Christoph, and list, On 2006-11-30 03:20:56, Hans-Christoph Steiner <[EMAIL PROTECTED]> appears to have written: > locales is the library and tool that handles that stuff, IIRC. You'll > want to look into the env vars LANG, LC_ALL, etc. I think that's > supposed to be system-wide, but with all those grabbag distros based on > the Linux kernel, you never know who implemented what and how in their bit.
afaik, locale.h doesn't handle any character set translation; it just ensures that isalpha() & co. work sensibly. there's also no guarantee that the current input and/or display modes will conform to the value of $LANG, but i agree that $LANG is probably the safest information source for the user's preferred encoding. > On Nov 29, 2006, at 4:37 PM, Thomas Grill wrote: >> Is there an API function to query this encoding i don't know which function(s) to use, but you might also look at the "registry" and "encoding" fields of the currently selected X font. >> is there a system function to convert from/to UTF-8? i don't think there's anything like a universally applicable system function guaranteed to work everywhere, but i use librecode for character set translation on linux. i've also heard good reports about iconv, but have never used it directly myself. marmosets, Bryan -- Bryan Jurish "There is *always* one more bug." [EMAIL PROTECTED] -Lubarsky's Law of Cybernetic Entomology _______________________________________________ PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev