Giter Club home page Giter Club logo

Comments (14)

Rahi374 avatar Rahi374 commented on June 17, 2024

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.

RitwikGupta avatar RitwikGupta commented on June 17, 2024

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.

RitwikGupta avatar RitwikGupta commented on June 17, 2024

Encode every string as UTF-8 from start to end

from pittapi.

Rahi374 avatar Rahi374 commented on June 17, 2024

I see.
So then the string replacements (like \u2013 to &) can still stay but we treat all strings as unicode?

from pittapi.

RitwikGupta avatar RitwikGupta commented on June 17, 2024

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.

RitwikGupta avatar RitwikGupta commented on June 17, 2024

You wouldn't have to do anything with the e either then. It'll properly be represented with an accent automatically.

from pittapi.

Rahi374 avatar Rahi374 commented on June 17, 2024

I see.
But wouldn't it be difficult to type it in when one is trying to get_dining_location_by_name()?

from pittapi.

RitwikGupta avatar RitwikGupta commented on June 17, 2024

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.

Rahi374 avatar Rahi374 commented on June 17, 2024

Oh okay.
So it's fine to have unicode characters in dict keys?

from pittapi.

RitwikGupta avatar RitwikGupta commented on June 17, 2024

Since the main purpose of any of these return values is mainly for display anyways, yep!

from pittapi.

Rahi374 avatar Rahi374 commented on June 17, 2024

I'll wait until the PeopleAPI asynchronization is finished before doing this.

from pittapi.

RitwikGupta avatar RitwikGupta commented on June 17, 2024

Just start working on it in a branch and we can deal with merge conflicts!

from pittapi.

Rahi374 avatar Rahi374 commented on June 17, 2024

Oh okay got it.

from pittapi.

RitwikGupta avatar RitwikGupta commented on June 17, 2024

Dropped Py2.7 support, everything is Unicode now.

from pittapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.