>
> The problem isn't just as easy as using utf-8, unfortunately not  
> everybody's source encoding is utf-8. Basically WebError needs to  
> determine the actual source encoding used (there's a patch in the  
> ticket for that), and use that to generate a displayable version.

Note that I patched it differently than the original poster. He
did:

  source.decode('utf-8').encode('ascii', 'xmlcharrefreplace') 

while I did just

  source.encode('utf-8', 'xmlcharrefreplace')

I have no clue whether source is string, unicode, or something else,
but surely those instructions are not doing the same things.

And still, if some XML is to be generated here (I do not know what for),
then encoding it as utf-8 is surely safer bet than encoding it as ascii.

(and if some user needs to get it as ascii, he or she can instruct
XML parser used to do the conversion...)

-- 
----------------------------------------------------------------------
| Marcin Kasperski   |  In any large change, 1/3 will think it is
| http://mekk.waw.pl | great, 1/3 will think it is stupid, and 1/3
|                    |               will wait (Reed)
----------------------------------------------------------------------


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to