Hi,
I have some doubts and I hope you can dissolve them.
I'm using as my target machine a Pocket PC with Windows Mobile SE
2003. I have a client written in Java and a server written in C++. I
have to send characters such as =E8,=F2,=E0 and so on. I suppose that if I
send from java application such characters and I receive them in a
char array,they'll be misunderstood right?
The charset in use on the Pocket PC is ISO8859_1 (discovered through
java application). If I send bytes with this encoding,how can I deal
them? wchar_t?
And how I send responses to the client? send is defined as:

send(
IN SOCKET s,
IN const char FAR * buf,
IN int len,
IN int flags
);

which it doesn't use wchar_t. Please give me some advices.
Thanks

Re: Dealing with charset between different applications (Java/C++) by ctacke/>

ctacke/>
Tue Feb 19 07:33:31 CST 2008

As long as the sender and the receiver use the same charset (and they will
be) then there's no problem. A socket sends a stream of bytes. It could be
ascii chars, wchars, image data or anything you want. As long as the sender
and receiver are using the same thing it will work fine.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com



"Christian" <voodoo81people@gmail.com> wrote in message
news:bfedba24-1a5d-4dcd-8d1b-942853a62f23@o77g2000hsf.googlegroups.com...
Hi,
I have some doubts and I hope you can dissolve them.
I'm using as my target machine a Pocket PC with Windows Mobile SE
2003. I have a client written in Java and a server written in C++. I
have to send characters such as è,ò,à and so on. I suppose that if I
send from java application such characters and I receive them in a
char array,they'll be misunderstood right?
The charset in use on the Pocket PC is ISO8859_1 (discovered through
java application). If I send bytes with this encoding,how can I deal
them? wchar_t?
And how I send responses to the client? send is defined as:

send(
IN SOCKET s,
IN const char FAR * buf,
IN int len,
IN int flags
);

which it doesn't use wchar_t. Please give me some advices.
Thanks



Re: Dealing with charset between different applications (Java/C++) by Christian

Christian
Wed Feb 20 03:43:39 CST 2008

On Feb 19, 2:33 pm, "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote:
> As long as the sender and the receiver use the same charset (and they will
> be) then there's no problem. A socket sends a stream of bytes. It could be
> ascii chars, wchars, image data or anything you want. As long as the sender
> and receiver are using the same thing it will work fine.

That's clear....
1) But how can I use ISO8859_1 charset in C++?
2) when I define a charr sequence,what's the default charset? And if I
define a wchar sequence?

Thanks.


Re: Dealing with charset between different applications (Java/C++) by ctacke/>

ctacke/>
Wed Feb 20 05:07:48 CST 2008

Just use wchar_t or TCHAR.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


"Christian" <voodoo81people@gmail.com> wrote in message
news:9641e07c-fca5-41a5-ab76-399a12c58238@e60g2000hsh.googlegroups.com...
> On Feb 19, 2:33 pm, "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote:
>> As long as the sender and the receiver use the same charset (and they
>> will
>> be) then there's no problem. A socket sends a stream of bytes. It could
>> be
>> ascii chars, wchars, image data or anything you want. As long as the
>> sender
>> and receiver are using the same thing it will work fine.
>
> That's clear....
> 1) But how can I use ISO8859_1 charset in C++?
> 2) when I define a charr sequence,what's the default charset? And if I
> define a wchar sequence?
>
> Thanks.
>



Re: Dealing with charset between different applications (Java/C++) by r_z_aret

r_z_aret
Wed Feb 20 14:25:47 CST 2008

On Wed, 20 Feb 2008 05:07:48 -0600, "<ctacke/>"
<ctacke[at]opennetcf[dot]com> wrote:

>Just use wchar_t or TCHAR.

These are equivalent if and only if UNICODE is defined for the build.
Which is always true when building for Windows CE and platforms built
on it. But mixing the two can cause nasty problems if the source code
is ever compiled with UNICODE not defined.

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com