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

154
Vistas
¿Cómo codificar código html o url en este formato \u00253Cbr\....?

¿Cómo codificar código html o url a este formato?:

 \u00253Cb\u002522\....

¡GRACIAS!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Para convertir la URL a esto, debe convertir su URL (cadena) al formato Unicode

puedes intentar seguir la función para ello.

 // here toUnicode function is attached to string so that it can used further with //other strings also String.prototype.toUnicode = function(){ var result = ""; for(var i = 0; i < this.length; i++){ // Assumption: all characters are < 0xffff result += "\\u" + ("000" + this[i].charCodeAt(0).toString(16)).substr(-4); } return result; }; let name = "john"; name.toUnicode(); // this will return unicodes of strings

Y por otro lado, puede obtener la URL de Unicode usando window.location.href (que estará en Unicode) y puede volver a convertirla en una cadena usando la siguiente función.

 // this function coverts the unicode to string char by char // so you need to loop through the string and call this function a //nd create resultant string function unicodeToChar(text) { return text.replace(/\\u[\dA-F]{4}/gi, function (match) { return String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16)); }); }
about 4 years ago · Juan Pablo Isaza 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