Comments (1)
This fix isn't recommended as it will break if you try and pass it an ascii string with out-of-position characters (done with above fix in place):
p.post(1,2,u'∆˙∂∆˚ƒ˙∆˚ß∂˙∆˚ƒ˙ß˚∂∆')
True
p.post(1,2,'∆˙∂∆˚ƒ˙∆˚ß∂˙∆˚ƒ˙ß˚∂∆')
Traceback (most recent call last):
File "", line 1, in
File "prowlpy.py", line 39, in post
'description': description.encode('utf-8'),
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)
It will also break if you pass it a non-string type (urlencode does the type casting right now)
A work around for now would be to do the encoding before you pass the variable into function (quick scripts are likely to use non-unicode strings, whereas trying to port this into something like Django would probably use the unicode type).
That said, better UTF8 support that just works should become a priority, and I'll add it to the list and see what similar python libraries behave.
from prowlpy.
Related Issues (5)
- installing module HOT 4
- Newlines '\n' are being escaped. HOT 1
- Publish on PyPI? HOT 1
- No longer working 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 prowlpy.