Home > front end >  JS string gb2312 encoding the problem
JS string gb2312 encoding the problem

Time:04-18

Around the string in gb2312 encoding problems, such as the string "all-in-one/team 6", code for the "% D2 FA BB BB E5 CC % % % % % % 2 f D7 A1 D0 % % % % E96", and then when I use this string of decoding, the error
Using this method: https://blog.csdn.net/bamuai7645/article/details/101082559
Good project, and then have a bug, bosses for help all of you!!!!!!

CodePudding user response:

URIError: URI malformed
The at decodeURIComponent (& lt; Anonymous>)
At the eval (GKB. Js? B65e: 61)
The at String. Replace (& lt; Anonymous>)
At the Object. The decode (GKB. Js? B65e: 60)
The at VueComponent. ChangeInputName (general - port. Vue? Fab9:350)
At the blur (general - port. Vue? 0983:131)
The at VueComponent. Invoker (vue. Runtime. Esm. Js? 2 b0e: 2023)
The at VueComponent. Vue. $emit (Vue. Runtime. Esm. Js? 2 b0e: 2534)
The at VueComponent. HandleBlur (element-ui.com mon. Js? 5 c96:5939)
The at invoker
To the mistake like this

CodePudding user response:

Encryption that:

If (isAscii (code)) {
//return encodeURIComponent (a); This sentence for the following
return a;
}
  • Related