ponce
Sat Jan 14 02:43:19 CST 2006
Hi MSenne
sorry for this late reply...
i am using Windows API to do the Windows CE programming. So far, it
works by removing the NULLs in the Java program. I believe that it will
work as well if i convert it to ASCII first before sending
<strong>specifically to my case</strong>. i wish that managed codes can
be used but it will take up too much time to create a C interface for
the SDK which i am using. Hence, i have to stay with API.
one more thing, is there any recommended sites for learning strings? it
gets quite confusing as a new windows programmer to work with a mixture
of TCHAR, char, LPSTR, bytes... and conversion between the formats
because of the different devices being used...
Thanks :)
Ponce
MSenne wrote:
> No, not the best way to go. But if he wasn't using the .NET CF that's
> how I'd probably go for testing a simple "solution." If you want to
> convert it from Unicode before sending it to Java then you're going to
> lose 1 of the bytes from your data in any kind of conversion. Removing
> the first byte is a basic Unicode->ASCII conversion. That's all you're
> going to end up doing removing the first byte, but there are better
> ways to do it if you are using managed code.
>
> Looks like you are using .NET, so I guess I'll try to actually answer
> your question this time:
> How can the source encoding be found? Try the GetEncoding method from
> the System.Text.Encoding class.
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemtextencodingclassgetencodingtopic.asp
>
> -MSenne
>