translating foreign data
Ethan Furman
ethan at stoneleaf.us
Thu Jun 21 15:37:50 EDT 2018
On 06/21/2018 10:36 AM, Peter Pearson wrote:
> On Thu, 21 Jun 2018 10:12:27 -0700, Ethan Furman <ethan at stoneleaf.us> wrote:
>> I need to translate numeric data in a string format into a binary
>> format. I know there are at least two different methods of
>> representing parts less that 1, such as "10.5" and "10,5". The data
>> is encoded using code pages, and can vary depending on the file being
>> read (so I can't rely on current locale settings).
>>
>> I'm sure this is a solved problem, but I'm not finding those
>> solutions. Any pointers?
>
> Do you also have to accommodate the possibility that one thousand
> might be written "1,000" or "1.000"?
Nope, just the decimal character.
--
~Ethan~
More information about the Python-list
mailing list