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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OctetString and UTF8-String

Status
Not open for further replies.

chenyc

Programmer
Mar 11, 2003
2
DE
Hi,

Can anybody tell me, what is the difference between OctetString and UTF8-String?
I think, String in C is array of ASCII.
There is no difference for ASCII String between the two formats.

Thanks


Chenyc

 
I'm not sure about OctetStrings, but UTF8 strings are exactly the same as char* strings if you're using only English characters. If you start using DBCS or some high ASCII letters, then UTF8 starts to use multiple bytes to represent those characters.
 
No any String type in the C language. Common term C string is a name for conventional array of char with zero byte '\0' terninator. No any OctetString in C too.
In text data transmission and encoding area octet string is a chain of 8-bit unsigned char (in C terms). UTF-8 is a name of a Unicode text encoding standard (to represent Unicode characters as octet strings), see:
So the question related to different areas...
 
Thanks. Uft-8 String is as same as char* in C for ASCII array.
I am implementing a protocol. The "network name" should be tranferred as OctetString. What should I do?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top