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

156
Views
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 answers
Answer question

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 Report
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!