larry.martell at gmail.com
Sun May 25 12:10:08 PDT 2014
On Sat, May 24, 2014 at 8:42 AM, Andrew Byrne <byrneandrew46 at gmail.com> wrote:
> Ouch testing for a symbol!?
Yeah, the specific use case is I have a table of data, some
denominated in $ and some in ¢. It's generated by a PHP script. I need
to sort it on the client side in order of their values so I need to
divide the ¢ denominated ones by 100.
> I'm also thinking its a UTF8 / ISO char set thing.
> But the ¢ is a presentation issue can you test for something a little less
> ambiguous like using modulo to find the presence of a decimal.
Both the $ and ¢ values have a decimal point.
Thanks for the reply!
> On Sat, May 24, 2014 at 10:19 PM, Larry Martell <larry.martell at gmail.com>
>> I have a variable with this value:
>> In my program I do this:
>> ax = (a == '¢');
>> When my program run ax is False. But from the console it evaluates to
>> >>> a
>> >>> ax
>> >>> a == '¢'
>> >>> ax = (a == '¢')
>> >>> ax
>> Can anyone explain this odd inconsistency and tell me how I can test
>> for the cents character?
More information about the Help