Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

311
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda