question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UTF8 encoding problem

See original GitHub issue

While trying to use Python3 to build pycares.pyd, I get:

F:\MingW32\src\inet\DNS\c-ares\PyCares>python3 setup.py build
  File "setup.py", line 1
SyntaxError: encoding problem: utf8

What could be the reason for this?

I have no problem with Python2. But just moving that line 2 lines further down fixes it:

--- a/setup.py    2015-08-18 15:54:48
+++ b/setup.py 2015-08-18 15:26:35
@@ -1,5 +1,3 @@
-
-
 # coding=utf8

 from distutils.core import setup, Extension

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gvanemcommented, Aug 19, 2015

That was it! Python3 needs # coding=utf-8.

0reactions
saghulcommented, Aug 19, 2015

Thanks for confirming! I’ll fix it in this and other projects 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

UTF-8 Character Debug Tool - I18nQA
Unicode Windows 1252 Expected Actual UTF‑8 Bytes Unicode Windows 1252 Expect... U+20AC 0x80 € € %E2 %82 %AC U+00C0 0xC0 À 0x81 U+00C1 0xC1 Á U+201A...
Read more >
What is UTF-8 Encoding? A Guide for Non-Programmers
UTF-8 encoding is preferable to UTF-16 on the majority of websites, because it uses less memory. Recall that UTF-8 encodes each ASCII character...
Read more >
UTF8 encoding issue? - java - Stack Overflow
In the context of a Java String object, internally the String isnot encoded in UTF-8. It is encoded in UTF-16. That's largely irrelevant,...
Read more >
How to solve unicode encoding issues - Invivoo
Because Unicode can encode all possible characters, it has become a nightmare for artists creating fonts because redrawing each character is an ...
Read more >
How to fix: Invalid UTF-8 encoding - Google Support
Use proper UTF-8 encoding for text and avoid double encodingMerchant Center supports UTF-8, UTF-16, Latin-1, and ASCII. If you're unsure of your file's ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found