How to work with german "Umlaute" (ü, ö , ä) in python properly or ß?

4689
1
Jump to solution
02-09-2015 11:58 PM
JohannesBierer
Occasional Contributor III

Do these have to be replaced or is it possible to use them in python?

0 Kudos
1 Solution

Accepted Solutions
Luis_ÁngelPascual_Camino
New Contributor III

Hi Johannes.

I had the same problem with spanish characters, and I found a solution with this sentence at the first script line:

#  -*- coding: cp1252 -*-

Including the comment char, the initial hash key ==> #

If this charcode, cp1252, doesn't work, try another one, UTF-8 or similar.

Good luck!

Luis

View solution in original post

1 Reply
Luis_ÁngelPascual_Camino
New Contributor III

Hi Johannes.

I had the same problem with spanish characters, and I found a solution with this sentence at the first script line:

#  -*- coding: cp1252 -*-

Including the comment char, the initial hash key ==> #

If this charcode, cp1252, doesn't work, try another one, UTF-8 or similar.

Good luck!

Luis