Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

315
Views
Extended ASCII character ° not working as a dictionary key

For whatever the reason, I need a dictionary key with the character "°". The dictionary is declared the most straightforward way possible in a javascript file :

var myDict = {
    "Angle °": 150
};

Unfortunately, when iterating over my elements and comparing the keys, the equality evaluation with this specific key doesn't work.

In Chrome console, showing the dictionary keys with Object.Keys(myDict); shows this key with a specific question mark � instead of °.

However, when the dictionary is created the exact same way, directly in the Chrome console, everything is working well, that's why I cannot give an example snippet.

I have tried both this solutions :

  • Adding charset = "UTF-8" to the <script> tag.
  • Adding <meta charset="UTF-8"> in <head>.
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!