Commit Graph

6 Commits

Author SHA1 Message Date
Mika Bostrom
ff9305924c Use proper encoding name
When system is unicode, the second item in locale.getdefaultlocale() is
"UTF8", not "utf-8".
2010-01-26 20:31:11 +01:00
Mika Bostrom
b58edb53ae Write charmap-related errors directly to stderr
This change is needed to skip a nasty behaviour: if the string triggered
a decoding error, it will trigger one *AGAIN* if the string is printed
to console. By writing directly to sys.stderr we skip the
locale/conversion issues and get the troublesome string directly in a
file where it is stored as a raw sequence of octets.
2010-01-24 21:28:08 +01:00
Mika Bostrom
2c7287c351 Add new encoder
This encoder is used to handle input from HH conversion, which needs to
end up as UTF-8 in the database. Switch the open-coded routine from
Database.py to this common routine so all encodings now take place in
the same file.
2010-01-24 21:27:40 +01:00
Mika Bostrom
c36c60155c Use a different "unicoder" for db strings
It seems that running encoder.encode() on a latin1/latin9 string results
in, yes a bloody UnicodeDecodeError. Decode error on .encode()...
Really. This way the modification from non-unicode string to real
unicode appears to work better.
2010-01-24 13:35:10 +01:00
Gerko de Roo
7737720aa8 Conflicts:
pyfpdb/Charset.py
2010-01-23 16:35:57 +01:00
Gerko de Roo
53153bd00a Fixed limit and freeroll support for Partypoker tourney's 2010-01-23 16:32:32 +01:00