Re: ctype_print returns false for British Pound symbol (and non-ASCII symbols)
| From: | Bob | Date: | Fri, 26 Feb 2010 21:32:05 +0000 |
| Subject: | Re: ctype_print returns false for British Pound symbol (and non-ASCII symbols) | ||
| References: | 1 2 | Groups: | php.i18n |
| Request: | Send a blank email to php-i18n+get-1378@lists.php.net to get a copy of this message | ||
Hello, Rasmus.
Thank you for the excellent advice. I was trying to work out how to call
the C-native version of ctype_print, and you managed to explain how to do
so in very few bytes of text. (And led me to compile my first C program
in Linux. Haven't used C for about fifteen years.)
I get the exact same output as yourself:
Ubuntu:~/ctype_print$ ./a £
0
Ubuntu:~/ctype_print$ ./a $
16384
So you're right. It's nothing to do with PHP.
Which means that my question is now: how do I fix my locale? The £ is
definitely in the locale definition file (under "print") for i18n, which
is copied into the LC_CTYPE section by en_GB. So am I right in thinking
that it should be a valid printable character when using that locale?