uncode , multibye

F

free2cric

Hi
As a newbee here I want to ask you a question which I am not able
to get an answer for.

1. What is the difference between Unicode character and Multibye
character?
2. Which of the above is most commonly used.
3. functions like _mbsnbicmp , _tcstok, _tcslen, when should these be
used
in C. Mostly I see functions like strncmp, strtok, strlen not the
functions
which has "_" as prefix. Are these functions with _ as prefix are for
compability with different platforms? Will my program crash on other
platforms
if I use str* functions?

Thanks
Cric
 
C

Chris Barts

free2cric said:
Hi
As a newbee here I want to ask you a question which I am not able
to get an answer for.

1. What is the difference between Unicode character and Multibye
character?

First, there is no single Unicode encoding, so there is no such thing as
a Unicode character. There are UTF-8 characters, UTF-7 characters, and
UTF-16 characters, and those are just the encodings I happen to know about.

Second, any character that takes up more than one byte is a multibyte
character. Most of the defined codepoints in UTF-8, for example, are
wider than one byte, if you like your bytes to have eight bits, so a
specific run of multibyte characters may be UTF-8 text.

Then again, it may not.

I have a feeling you need to read this webpage:
http://www.joelonsoftware.com/articles/Unicode.html
2. Which of the above is most commonly used.

Mu. As I said, multibyte characters can be Unicode.
3. functions like _mbsnbicmp , _tcstok, _tcslen, when should these be
used in C.

When some system-specific library has provided them for you.
Mostly I see functions like strncmp, strtok, strlen not the
functions which has "_" as prefix.

Because those functions are standard and prototyped in string.h.
Are these functions with _ as prefix are for compability with different platforms?

Those functions will /break/ compatibility with different platforms, if
that's what you mean.
Will my program crash on other platforms if I use str* functions?

Not if you use them correctly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,416
Latest member
LionelQ387

Latest Threads

Top