Is isalnum ASCII only (locale independent) or does is return true for any character of any locale?
I'm trying to write a short program that converts a binary file into an escaped string that can be included in a source file, thus I need to escape everything not /{0~9a~zA~Z}/.
e.g. static char image = "[converted data goes here]";
Also, is char always 8 bits, or are there platforms where it changes? and is there a simple way of implementing portable data type sizes (not only char).
Is alnum ASCII only?
Started by kenna, Nov 22 2007 11:07 AM
1 reply to this topic
#1
Posted 22 November 2007 - 11:07 AM
|
|
|
#2
Posted 23 November 2007 - 08:05 AM
Depending on your environment, you may not be dealing with ASCII at all. C/C++ works just as well with EBCDIC and other character encodings. You would need to check with your compiler documentation to see if there is any locale information involved.
Similarly, the number of bits a char can store is implementation dependent, depending on your hardware architecture, OS, and compiler.
Similarly, the number of bits a char can store is implementation dependent, depending on your hardware architecture, OS, and compiler.


Sign In
Create Account


Back to top









