Hi all,
I have modified a C file and executed it. While executing the executable file for that C file, it shows � is cannot be printed.
I have given isprint(�) to test it. When I copy the old executable file and execute it it shows it can be printed.
Then I retain the C code back and executed it also. Then also its showing the same error that it cannot be printed.
Is it possible to find the differences between the two executable files. I dont know how the old executable file is not showing any
error while the new executable is showing error..
what will be reason...pls let me know
Note : All the C files are in Unix environment.
Characters like that are usually unprintable because they are not ASCII, i.e., characters less than 128 in the C (POSIX) locale
isprint() and other functions that classify characters base their decisions on the locale.
The isprint() function shall test whether c is a character of class print in the program's current locale; see the Base Definitions volume of IEEE Std 1003.1-2001
localedef is used to set up what characters in a non-standard locale are printable.
To answer you question, it sounds like your code is running against a character codeset that is not compliant with your locale - and your old program was not working correctly when it said it could print a non-ascii character.
post the code.