Lars Lingner napisaĆ(a): >> I am far away from being a unicode master, but in my software >> which accepts many variously encoded inputs, I am using a piece >> of code similar to to_unicode() function from Trac package: >> >> http://trac.edgewall.org/browser/trunk/trac/util/text.py
> Thank you for answering. I'll have a look at your code and maybe I'll > using it instead of ".encode(...)" To clarify, this code is not mine, I am just basing on it (and on some similar functions). Plain .encode() was failing for me, so I thought that all those (widely understood) web frameworks are prepared for accepting variously encoded input. I've taken a look on how it is done in Trac, Django and a few more and implemented it for my own needs. > The thing is: These are my first steps with python and I'm absolutely > unsure whether its good practice or as I said its just an coincidence. Dealing with UnicodeDecode/EncodeError is a common thing (at least google says so) and thus it might not be enough (but I am not an expert, I am actually allergic on all those charset problems ;-)). -- Regards, Wojtek Walczak, http://tosh.pl/gminick/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sphinx-dev" 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/sphinx-dev?hl=en -~----------~----~----~----~------~----~------~--~---
