I need to convert a string from the default encoding used by the OS to UTF-8 for delivering to the external. How can I do it? Is there a system API for it (sorry, but I could not find it)? If not, is there any code snippet for it?

First, a general comment that most routines for direct text manipulation are either in the String Mgr or the Text Mgr, so that's where you'd want to start looking.


Second, a comment on the code Greg posted...you'll need to use LmGlueGetSystemLocale(), since LmGetSystemLocale was added in 6.0.

Finally, there are two other reasons for the existence of TxtGlueConvertEncoding beyond backwards compatibility to 3.5. It also works around a bug in the Sony 3.5 implementation of this routine, and it allows you to pass the charEncodingDstBestFitFlag in with the destination encoding without having to check which OS version supports this flag.

-- Ken
--
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

--
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to