Cygwin 1.7.1 sprintf() with format string having 8th bit set
Joseph Quinsey
jquinsey@entrenet.com
Mon Jan 4 15:07:00 GMT 2010
Hello,
Thank you Andy for your help. As per your suggestion, the problem was
resolved by adding the line:
setlocale (LC_CTYPE, "C.ASCII");
My actual code was something like:
#define CSI_ "\233"
...
sprintf (..., CSI_"%d;%dH", row, col);
So my problem is fixed.
But as a matter of general interest, there are still some oddities:
1) In my bad test, I already had my LOCALE set to C.ASCII:
env | grep LC
LC_ALL=C.ASCII
I'm using tcsh(1), if this matters. And this setting generates a nuisance
message "locale not supported by Xlib, locale set to C" whenever I start
nedit. And $LANG is ASCII, if this matters.
2) The call setlocale (LC_CTYPE, "C") did not work, although it returns its
second argument.
3) The call setlocale (LC_CTYPE, "POSIX") also did not work. It happens to
return "C".
The above behaviour seems to disagree with the man page.
Thank you again for your very prompt help.
Regards, Joe Quinsey
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list