plonezpt

Plone configuration


Plone is showing the special chars from my mother language (Brazilian Portuguese) in its pages. However, when I use a spt page I created it shows escape sequences, e.g.:

Educa\xc3\xa7\xc3\xa3o

instead of

Educação

(by the way, it means Education). I'm creating a python function to replace the escape sequences with the utf chars, but I have a feeling that I'm slaving away without need.


Solution

  • Are you interpolating catalog search results? Those are, by necessity (the catalog cannot handle unicode) UTF-8 encoded.

    Just use the .decode method on strings to turn them into unicode again:

    value = value.decode('utf8')