Comments (14)
I only see you using \u once, replacing \u0026
with &
I did a replacement once too, of \u2013
to -
I personally think it's easier to work with &
and -
as ascii characters.
I convert between é and e when I'm translating dining location names to dict keys and vice versa, but I feel like that's more convenient since you don't really want to have to type special unicode characters into a dict key.
from pittapi.
Right, I'm using Unicode characters once in a while myself, but what I mean is for you to ensure that all strings are being handled as UTF-8 in the code. Right now they're mostly being handled as ASCII and that's wrong.
from pittapi.
Encode every string as UTF-8 from start to end
from pittapi.
I see.
So then the string replacements (like \u2013
to &
) can still stay but we treat all strings as unicode?
from pittapi.
Once you change all string to proper unicode, the \u2013
will actually go away and we'd be able to use the proper en dash character to replace instead.
from pittapi.
You wouldn't have to do anything with the e
either then. It'll properly be represented with an accent automatically.
from pittapi.
I see.
But wouldn't it be difficult to type it in when one is trying to get_dining_location_by_name()
?
from pittapi.
Yes, but that function may not be the best idea in the first place especially because it's easier to get all the data anyways.
from pittapi.
Oh okay.
So it's fine to have unicode characters in dict keys?
from pittapi.
Since the main purpose of any of these return values is mainly for display anyways, yep!
from pittapi.
I'll wait until the PeopleAPI asynchronization is finished before doing this.
from pittapi.
Just start working on it in a branch and we can deal with merge conflicts!
from pittapi.
Oh okay got it.
from pittapi.
Dropped Py2.7 support, everything is Unicode now.
from pittapi.
Related Issues (20)
- Use LaundryView's JSON API instead of BeautifulSoup HOT 2
- Issues with Shuttle API's get_vehicle_route_stop_estimates HOT 1
- IndexError when getting extra details for section HOT 1
- Exception of course caused by the edge case HOT 3
- Courses HTML Page is updated so scraping is incorrect HOT 1
- Making the package name lowercase HOT 1
- Moving docs onto readthedocs
- Switch from unittest to pytest
- Fixing up the docstrings in sports api
- Adding typing information into sports api
- Looking over the data results of sports api
- People api seems to be dead.
- Any API using m.pitt.edu are dead, new scrapers needed!
- make PittAPI actually an API HOT 4
- Unit tests should be hermetic HOT 1
- ValueError when using BeautifulSoup in lab.py HOT 18
- Create a Library API HOT 1
- People API is broken HOT 2
- README.md issues HOT 4
- As of this term, the Course API is broken HOT 2
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 pittapi.