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

155
Vistas
Javascript unescape equivalent in golang?

Is there an equivalent of JavaScript's unescape() in Golang?

JavaScript example:

<script>
var c = unescape('%u0107');     // "ć"
console.log(c);
</script>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The unescape function is marked as "Deprecated" (red trash can), in the Mozilla documentation [1]. As such, I wouldn't recommend using it, and certainly not seeking out an equivalent Go function. Go has a similar function [2], but it expects different input from what you have provided:

package main
import "net/url"

func main() {
   s, err := url.PathUnescape("%C4%87")
   if err != nil {
      panic(err)
   }
   println(s == "ć")
}

If you are really set on doing this, you could see about translating this polyfill [3].

  1. https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/unescape
  2. https://godocs.io/net/url#PathUnescape
  3. https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.unescape.js
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