How to do special encode in string ?

Discussion in 'Python' started by fowlertrainer@anonym.hu, Jun 22, 2004.

  1. Guest

    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"
    , Jun 22, 2004
    #1
    1. Advertising

  2. This recipe may be helpful

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

    /Jean Brouwers


    In article <>,
    <""> 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"
    >
    >
    Jean Brouwers, Jun 22, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Soefara
    Replies:
    2
    Views:
    4,573
    Soefara
    Feb 11, 2004
  2. Replies:
    1
    Views:
    647
    Tilman Bohn
    Dec 13, 2004
  3. Replies:
    3
    Views:
    385
    Chris King
    Jun 23, 2004
  4. Replies:
    2
    Views:
    308
    Scott David Daniels
    Jun 23, 2004
  5. Stefan Braun

    SOAP::Lite, encode and special characters

    Stefan Braun, May 9, 2007, in forum: Perl Misc
    Replies:
    0
    Views:
    177
    Stefan Braun
    May 9, 2007
Loading...

Share This Page