Re: [web2py] Hebrew encoding

2012-06-02 Thread Udi Milo
What I want to do is just to get the & characters into Hebrew, and I don't want to touch the rest. I don't care that it has invalid HTML tags. I don't understand how an encoding method has an exception on invalid tags... how are the two issues related? On Saturday, June 2, 2012 1:46:18 AM U

Re: [web2py] Hebrew encoding

2012-06-01 Thread Martin Weissenboeck
Hi Udi, I have tried it once again. I had to change from to and from to . "unescape" works now! But it would be interesting to learn about more this problem. Could you please answer Massimos questions? 2012/6/2 Massimo Di Pierro > I am not sure there is an error here. Is the problem that t

Re: [web2py] Hebrew encoding

2012-05-31 Thread Martin Weissenboeck
I have found at http://wiki.python.org/moin/EscapingXml: import xml.parsers.expat def unescape(s): want_unicode = False if isinstance(s, unicode): s = s.encode("utf-8") want_unicode = True # the rest of this assumes that `s` is UTF-8 list = [] # create and in

[web2py] Hebrew encoding

2012-05-31 Thread Udi Milo
part of my product receives user text, saves it and shows it later. one of my users added a hebrew text attached below and I do not know how to translate it into letter instead of hex. simple text.encode('UTF-8') doesn't work, and I am far from being an expert in the subject. can someone help me