Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to learn how to automate tasks with python3. Right now, I am trying to open a website, get an element from it and then get its text to a word sheet as a new paragraph, using the requests, docx and bs4 modules. All this works just fine, but the website contains some Greek letters. When I try to open the word sheet, the numbers etc are fine but the greek letters appear wrong (they all appear as Öéëïá etc). How can I solve this problem?? Thanks in advance for your time

What I have tried:

I have tried changing the encoding to any other encoding i could think of (ANSI, ASCI, ISO, UTF-8) but it hasn’t helped
Posted
Comments
Richard MacCutchan 1-May-18 7:07am    
Try UTF-16. If you look at the Windows character map accessory you can see the values used for Greek letters.
Vissa16 1-May-18 10:42am    
That didn’t do the job. Greek letters are within the UTF-8 charset.
Richard MacCutchan 1-May-18 12:21pm    
You need to adjust your codepage settings to display them.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900