First: I'm no python guru
but this seems to be one of python's oddities when dealing with ttys or
terminals.
Try something like:
python -c 'print u"\xe4"'
python -c 'print u"\xe4".encode("utf-8")'
python -c 'print u"\xe4".encode("utf-8")' | od -x
python -c 'print u"\u2aac".encode("utf-8")' | od -x
Not sure if http://docs.python.org/howto/unicode.html is still up-to-date.
May be setting proper environment variable for LANG and LC_* can help.
-Achim
Am 30.01.2012 20:59, schrieb Hans-Martin Münch:
> Hi all
>
> While doing some tests, I noticed a problem with the parameter en-/decoding
> if a parameter value contains a special
> character like "ä", "ü" etc.
>
> Here is the exception, you can find a small testcase attached.
>
> Exception in thread Thread-11:
> Traceback (most recent call last):
> File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
> self.run()
> File "/usr/lib/python2.6/threading.py", line 484, in run
> self.__target(*self.__args, **self.__kwargs)
> File "/root/w3af2/core/ui/consoleUi/rootMenu.py", line 112, in _real_start
> self._w3af.start()
> File "/root/w3af2/core/controllers/w3afCore.py", line 456, in start
> self._realStart()
> File "/root/w3af2/core/controllers/w3afCore.py", line 655, in _realStart
> tmp_fr_list.append( '- ' + str(fuzzRequest) )
> File "/root/w3af2/core/data/request/fuzzableRequest.py", line 244, in
> __str__
> the_value = the_value.decode(self._dc.encoding)
> File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode
> return codecs.utf_8_decode(input, errors, True)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in
> position 1: ordinal not in range(128)
>
>
> If you have any questions please let me know
>
> Kind regards
>
> Martin
>
>
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
>
>
>
> _______________________________________________
> W3af-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/w3af-develop
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
W3af-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/w3af-develop