Re: Transmitting strings via tcp from a windows c++ client to a Java server
- From: "qqq111" <GiladHa@xxxxxxxxx>
- Date: 21 Feb 2006 10:07:56 -0800
Very interesting input, Chris. It does seem
that UTF-8 is the right way for us...
1. Our data will mainly consist of ASCII text
2. It turns out Windows does have an API for to/from UTF-8
conversions. See WideCharToMultiByte -and-
MultiByteToWideChar (code page s/b set to CP_UTF8)
3. Our system does not use DataInputStream, but rather:
CharsetEncoder/Decoder.
4. Each of our msgs is indeed preceded by a length field
(as fixed-size text field). Length is measured in Java
characters and dup by 2 to obtain size in bytes
5. The BOM issue is, frankly, news to me. If I limit myself to
UTF-8 strings only, and stick to standard Win/Java api at
both client & server end, do I need to worry about BOM ?
Thanks in advance,
Gilad
.
- Follow-Ups:
- References:
- Prev by Date: Struts validation using regular experssions
- Next by Date: Re: proper name for "comes out in the wash"
- Previous by thread: Re: Transmitting strings via tcp from a windows c++ client to a Java server
- Next by thread: Re: Transmitting strings via tcp from a windows c++ client to a Java server
- Index(es):
Relevant Pages
|