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

292
Vistas
Correct way of converting unicode to emoji

I'm using String.formCodePoint to convert Unicode to emoji, but some emojis don't convert as expected. They display like line icons. Please check the example below, first two emojis render correctly, but the last two don't.

for example:

const unicode = ["1f976", "1f97a", "263a-fe0f", "2639"]


unicode.forEach((val) => {
  document.body.innerHTML += String.fromCodePoint(parseInt(val, 16))
});

Result:

enter image description here

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Your code is not correct.

Old Emoji are not coloured by default, so you need to add the variation code 'fe0f`. You tried on the third one (but not on the forth one), but you convert wrongly to numbers, so it will fail.

This code will fix it (if you have emoji fonts installed).

const unicode = ["1f976", "1f97a", "263a", "fe0f", "2639", "fe0f"]


unicode.forEach((val) => {
  document.body.innerHTML += String.fromCodePoint(parseInt(val, 16))
});

about 4 years ago · Santiago Trujillo Denunciar
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