Select to view content in your preferred language

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

5074
1
Jump to solution
02-09-2015 11:58 PM
JohannesBierer
Frequent Contributor

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

0 Kudos
1 Solution

Accepted Solutions
Luis_ÁngelPascual_Camino
Occasional Contributor

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
Occasional Contributor

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