Re: [Zope] French language problems
Peter Bengtsson writes:
I want to "filter" the user input a bit. If somebody submits name="éèà", in the end I want: name="eea"
So I tried this:
<pseudo atr="filling in the input name='é'"> print self.REQUEST['name'], 'é' print self.REQUEST['name'] == 'é' </pseudo>
This returns '\303\251', 'é' 0
Basically, how do I compare self.REQUEST['name'] with 'é' and get true? (assuming the name variable is set to "é". (you understand what I mean) Your REQUEST variables seem to be "UTF-8" encoded:
'\303\251' is the UTF-8 code of 'é'. You have different options: * convince your browser to send "iso-8859-1" encoded data. I think, it uses the encoding that he found in the form constructing page. But others made different experiences. Please look into the (searchable) mailing list archives for the relevant threads. * handle encoding in your own code (DTML or Script). Dieter
participants (1)
-
Dieter Maurer