svartman95 at gmail.com
Sat May 24 05:39:11 PDT 2014
> In my program I do this:
> ax = (a == '¢');
> When my program run ax is False. But from the console it evaluates to True:
> Can anyone explain this odd inconsistency and tell me how I can test
> for the cents character?
The inconsistency may be stem from a character encoding issue. Have you
ISO-8859-1 (Latin-1)? Most likely, you're saving the file as a
Windows-1252 text file, but your browser is trying to interpret it as UTF-8.
In your text editor, try File->Save As and select a different character
encoding. On Mac OS X and other unices, you can inspect the character
encoding of a file with a command called file(1). Try typing „file
Desktop/Folder/file.js“ without the quotes (substituting the filename)
into the command line of a terminal.
P.S. The Vim command, if you happen to be using that text editor.
More information about the Help