Problem with swedish characters

Asked by DH

Hi, I've a problem with printing swedish characters on my Windows 10 client.
This is my use case:

On top of Sikuli-script:

#! /usr/bin/env python
# -*- coding: utf-8 -*-
# -*- coding: ISO-8859-1 -*-
import re
import sys
import codecs

testHeader = find(My_image_with_swedish_charchters_åäö_ÅÄÖ).text()

When I print testHeader, the text from the image is not formated ok.
It's supposed to be : ÄlvdalenHejHå

But gives: AlvdalenHejHa

Tried with print (testHeader .encode("utf-8"))

When I try without found(image) It works just fine.

Example here:

#! /usr/bin/env python
# -*- coding: utf-8 -*-
# -*- coding: ISO-8859-1 -*-
import codecs

print ("Bevara kÄllkåden föÖr framtiden!") gives: Bevara kÄllkåden föÖr framtiden!

Any ideas?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1
Revision history for this message
DH (dh72) said :
#2

Thanks RaiMan, that solved my question.