Thanks for the reply.  I will try the unsigned chars setting in the
compiler.  I wanted to say that my code is not calling the TxtCharAttr
function.  It is happening via the system code somewhere during a field
input.  So I have no control over how it is called.  This is why I am really
stumped.  Perhaps this is an attribute I need to place on the app or the
field that will fix this problem?

"Craig Torell" <[EMAIL PROTECTED]> wrote in message
news:49739@palm-dev-forum...
> TxtCharAttr takes a WChar as a parameter, which is a UInt16. If you try to
> pass it a parameter that is a signed char (or Int8), and that parameter
has
> a value greater than 0x7F, its sign will be extended into the upper byte
> when it is converted to a UInt16, thus producing an invalid character
code.
> One way to prevent this is to select "Use Unsigned Chars" in your C/C++
> Language settings panel for your project, as long as this doesn't break
> something else in your code. Otherwise, just make sure the character you
> pass to TxtCharAttr is an unsigned type. You could probably also use a
> typecast within the call itself, e.g. TxtCharAttr((UInt8) myChar).




-- 
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