subprocess + mysqldump = encodnig Problem :(
Verfasst: Donnerstag 15. Juni 2006, 20:33
Ich dachte eigentlich hätte ich das encoding Thema im Griff... Dem ist aber wohl nicht so ganz...
Ich rufe mysqldump per subprocess auf. process.stdout.read() liefert mir einen String... Nur in welchem Encoding???
Ausschnitt aus PyLucid's system_info:
Irgendwie ist nichts brauchbares dabei 
ascii ist zumindest nicht wirklich was... Ich möchte schon gern Umlaute im Dump sichern können...
Ein Test mit latin1 und utf8 brachte nur ein UnicodeError...
Das ganze läuft auf:
Ich rufe mysqldump per subprocess auf. process.stdout.read() liefert mir einen String... Nur in welchem Encoding???
Ausschnitt aus PyLucid's system_info:
Code: Alles auswählen
sys.stdin.encoding:
Error: Object has no .encoding!
sys.stdout.encoding:
Error: Object has no .encoding!
sys.stderr.encoding:
Error: Object has no .encoding!
sys.getdefaultencoding():
ascii
sys.getfilesystemencoding():
Error: 'module' object has no attribute 'getfilesystemencoding'
locale.getlocale():
(None, None)
locale.getdefaultlocale():
(None, None)
locale.getpreferredencoding():
Error: 'module' object has no attribute 'getpreferredencoding'

ascii ist zumindest nicht wirklich was... Ich möchte schon gern Umlaute im Dump sichern können...
Ein Test mit latin1 und utf8 brachte nur ein UnicodeError...
Das ganze läuft auf:
- Linux - infong275 - 2.6.16.13-20060523a-areca - #1 SMP Tue May 23 17:47:33 CEST 2006 - i686
Python v2.2.1 (#1, Aug 25 2004, 16:56:05) [GCC 2.95.4 20011002 (Debian prerelease)]
mysqldump Ver 10.10 Distrib 5.0.16, for pc-linux-gnu (i686)