Is there a difference between converting a string of ASCII digits to an integer versus a string of non-ASCII digits to an integer?
Roger L Costello
costello at mitre.org
Mon Dec 14 14:17:48 CST 2020
Hi Folks,
As I understand it, when the C programming language was created it just used ASCII. Programs written in C used ASCII digits.
Nowadays C supports Unicode and Unicode contains more digits than just the ASCII digits. (I think) modern C programs can express numbers using strings of non-ASCII digits.
Questions:
1. Is the algorithm for converting a string that contains non-ASCII digits different than the algorithm for converting a string containing ASCII digits?
2. The C function atoi() converts a string of digits to a number. I have seen the source code for atoi(). The source code that I saw was dated around the year 2000. Can you point me to the modern source code for atoi()?
/Roger
More information about the Unicode
mailing list