translating foreign data
Marko Rauhamaa
marko.rauhamaa at 1
Sat Jun 23 16:03:10 EDT 2018
To: Richard Damon
From: "Marko Rauhamaa" <marko.rauhamaa at 1:261/38.remove-r7u-this>
To: Richard Damon
From: Marko Rauhamaa <marko at pacujo.net>
Richard Damon <Richard at Damon-Family.org>:
> If you know the Locale, then you do know what the decimal separator
> is, as that is part of what a locale defines.
I don't know what that sentence means.
> The issue is that if you just know the encoding, you don't necessarily
> know the locale.
I always know my locale. The locale is tied to the human user.
> He also commented that he didn't want to set the locale in the
> routine, as that sets it globally for the full application (but
> perhaps that latter could be fixed by first doing a
> locale.getlocale(), then setlocale for the files locale, and then at
> the end of reading and processing restore back the old locale.
Setting a locale application-wise is
* not in accordance with the idea of a locale (the locale should be
constant within a user session)
* not easily possible (the locale is seen by all threads
simultaneously)
BTW, I think the locale is a terrible invention.
Marko
-+- BBBS/Li6 v4.10 Toy-3
+ Origin: Prism bbs (1:261/38)
--- BBBS/Li6 v4.10 Toy-3
* Origin: Prism bbs (1:261/38)
More information about the Python-list
mailing list