Non-standard implementations[edit]
There exists a non-standard encoding for Unicode characters: %uxxxx
, where xxxx is a UTF-16 code unit represented as four hexadecimal digits. This behavior is not specified by any RFC and has been rejected by the W3C. The third edition of ECMA-262 still includes an escape
function that uses this syntax, but also encodeURI
andencodeURIComponent
functions. These latter functions apply UTF-8 encoding to a string, and then percent-escape the resulting bytes.
https://en.wikipedia.org/wiki/Percent-encoding
时间: 2024-10-08 20:44:54