Re: [PD-dev] pool files: UTF-8 encoding
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
[PD-dev] pool files: UTF-8 encoding
Hi all, trying to fix loading/saving of non-ASCII characters in pool files. In the future, text files will still be saved in the native encoding, but XML will be UTF-8. Since i'm not very linux-savvy: I guess the default code table used for PD patchers is the same as being used for the X-server, right? Is there an API function to query this encoding and/or is there a system function to convert from/to UTF-8? best greetings, Thomas -- Thomas Grill http://g.org ___ PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
Re: [PD-dev] pool files: UTF-8 encoding
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. .hc On Nov 29, 2006, at 4:37 PM, Thomas Grill wrote: Hi all, trying to fix loading/saving of non-ASCII characters in pool files. In the future, text files will still be saved in the native encoding, but XML will be UTF-8. Since i'm not very linux-savvy: I guess the default code table used for PD patchers is the same as being used for the X-server, right? Is there an API function to query this encoding and/or is there a system function to convert from/to UTF-8? best greetings, Thomas -- Thomas Grill http://g.org ___ PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev Computer science is no more related to the computer than astronomy is related to the telescope. -Edsger Dykstra ___ PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev