Hi Rick,

>scenario:I have a string that says something like "1 out of 5" but in
>Japanese where the "1" is an index....%i, the rest used to be %s when it was
>english.
>I tried the %C sprintf'ing each part of the Japanese string in pieces but
>they come out unrecognizeable, not a Japanese character. Not the most
>desireable way to do it anyway. {StrPrintF(title,"5 %C %C %C %i
>%C",*st0,*st1,*st2,index+1,*st3);}

The %C conversion specifier expects a WChar, which is a 16-bit value. 
So you'd have to get each character to be printed using 
TxtGetNextChar.

>By the way, the rest of my screen is
>Japanese, so Japanese is displaying ok.
>Should I be using text manager functions for an operation such as his one?
>Which ones?

You are correct in that StrPrintF shouldn't be used to generate text 
messages - it doesn't give localizers the flexibility they need to 
re-arrange string elements.

The correct Text Mgr routine to use would be TxtParamString, or the 
equivalent TxtGlueParamString in PalmOSGlue if you need to run on 
older versions of the OS.

-- 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/tech/support/forums/

Reply via email to