How to do special encode in string ?

Jean Brouwers mrjean1 at comcast.net
Tue Jun 22 11:32:37 EDT 2004


This recipe may be helpful

<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/251871>

/Jean Brouwers


In article <mailman.11.1087908003.27577.python-list at python.org>,
<"fowlertrainer at anonym.hu"> wrote:

> Hi !
> 
> I'm hungarian, we use special characters like:
> á - a'
> õ -o"
> 
> etc.
> 
> I want to encode this characters to in config file I see these
> characters as \nnn format.
> And I want to decode it automatically with python.
> 
> How to I do it without write complex converter tool ?
> 
> Thanx for it:
> FT
> 
> Example:
> Encode("az állam én vagyok") -> "az \xe1llam \xe9n vagyok"
> 
> Decode("az \xe1llam \xe9n vagyok") -> "az állam én vagyok"
> 
>



More information about the Python-list mailing list