Comments (1)
This line doesn't set an encoding when reading the file, which means that it defaults to a platform specific encoding.
On Windows (10), this is cp1252
, which cannot handle the Unicode characters.
- According to PEP 3120, UTF-8 is the default source encoding for Python 3 source
- According to PEP 263, ASCII is the default source encoding for Python 2 source
However, it is also possible for users to define their own source encoding using a comment syntax as defined in PEP 263.
So it seems that in an ideal world, retype would determine the encoding from these PEP 263 comment lines, defaulting to UTF-8.
from retype.
Related Issues (15)
- lib2to3_parse assumes that the ParseError will always refer to an existing line HOT 1
- track line numbers between sources and target HOT 1
- allow ignoring folders during rewrite HOT 1
- Support overloaded definitions. HOT 1
- Class not found in source with @type_check_only HOT 3
- retype does not seem to handle `Callable` correctly
- single and double quotes in literals not handled correctly
- Redefining aliases that use typing module fails
- Doesn't support property setters HOT 4
- Mermaid diagram svg sizing issues - fixed height HOT 1
- Information: is there any public Python API? HOT 1
- Checkboxes in readme render as raw HTML on PyPI HOT 1
- quote forward references HOT 3
- Incompatible existing annotations when referencing classes in other modules HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from retype.