
On Friday 10 February 2006 11:34, Stefan J. Betz wrote:
Hallo,
ich habe eine kleines Problem:
Ich schreibe gerade ein CGI-Script für Swish-E, nur leider habe ich ein kleine Problem damit, wenn ich das Suchformular mit äöü usw. Fülle, dann passiert das hier: ['# SWISH format: 2.4.3\n', '# Search words: halloa \xe4 \xf6 \xfc \xdf duda\n', '# Removed stopwords: \n', 'err: no results\n', '.\n']
( Das ist die Ausgabe von print os.popen().readlines() )
Wie kann ich dafür sorgen das os.popen() an Swish-E die Umlaute weiterreicht?
Tut es doch. Ist halt hexcode in der repräsentation als bytestring - wie gibst du das denn aus? Python 2.4.2 (#2, Sep 30 2005, 21:19:01) [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. Welcome to rlcompleter2 0.96 for nice experiences hit <tab> multiple times
'äöü' '\xc3\xa4\xc3\xb6\xc3\xbc' print 'äöü' äöü
BTW, das da oben ist UTF-8-encodiert, deines nehme ich mal an latin1. MfG Diez _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de