I'd take a look at the codecs module in Python, certainly if you're looking
to read/write the data from file. We're doing a lot of localisation for
language support at the moment
with codecs.open(textfilepath, 'w', encoding='utf8') as fp:
fp.write(text_to_write)
fp.close()
cheers
Mark
On 26 November 2015 at 13:49, Rémi Deletrain <[email protected]>
wrote:
> Hi everybody,
>
> I try to encode a string utf-8
>
> myString = "" === Pr \ u00e9sentation of ... === ""
> with "\ u00e9", which is the letter "é"
>
> but I happens by no means has transform my string properly.
>
> I decode with "cp1252"
> and again with "latin1"
>
> with variable myString I have no problem, but on a much longer text I have
> another problem. I think there are different encoding type in the text that
> I have ...
> In the end I just want a "utf-8" format.
>
> I tried with unidecode module, but suddenly I lost all the accents that
> are important in this text.
>
> someone a solution?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/069d653a-ca78-465c-abc8-a1093eac17bf%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/069d653a-ca78-465c-abc8-a1093eac17bf%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
-------------------------------------
Mark Jackson
CEO / Technical Director
red9consultancy.com
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAGQH2FE6UDsc%3Decj7trSfiTtn-uOLEbMcTJu6_B_iPHXnPT__A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.