Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

write UTF, read UTF & C++

Status
Not open for further replies.

Cagliostro

Programmer
Sep 13, 2000
4,226
GB
Hi,
I want to create a C++ client for a chat. The Java client I have created use function readUTF. How can I transform this UTF to wchar_t* and viceversa? Ion Filipski
1c.bmp


filipski@excite.com
 
I've never used read/writeUTF but according to the documentation it's a "Java modified UTF-8" format. That means in C++ you would have to supply your own code to read/write that same format.

If you want to develop it yourself the format is well documented in java.io.DataInput.readUTF().

Otherwise you might try a google search for an existing library/source in C++ that you can adopt.

good luck
-pete
 
I would know if there is some schema of mapping UTF to wchar_t* and endian wchar_t*. In the documentation I saw two schemas and do not know which one to apply. Another question is how can I know if characters int the strings are are endian or not? Is there any control characters? Ion Filipski
1c.bmp


filipski@excite.com
 
>> In the documentation I saw two schemas

i only see one in my docs. can you post a link to where your seeing the two schemas?

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top