T
test
I'm trying to convert UCS-2 code to ASCII. Does anyone have an example in
C?.
thanks.
C?.
thanks.
test said:I'm trying to convert UCS-2 code to ASCII. Does anyone have an example in
C?.
test said:I'm trying to convert UCS-2 code to ASCII. Does anyone have an example in C?.
for( i=0; i!=len; ++i)
if( (ucs2>=0) && (ucs2<127))
ascii = ucs2;
else
conversion_failed();
ascii = '\0';
Yes, not all UCS-2 can be converted to ASCII. Yes, character code 127
is not part of ASCII.
# Yes, character code 127 is not part of ASCII.
Rubout character.
In the good old days of paper tape, you couldn't remove a mistake. Instead you
backed up and punched all columns. The resulting all ones code (31, 63, 127, or
255) was a signal that character position was supposed to be ignored.
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.