简体   繁体   English

使用转义的unicode解码字符串(5个字符)

[英]Decode string with escaped unicode (5 character)

This post works great for escaped unicode with 6 characters (eg \%2F), but it doesn't work for escaped unicode with 5 characters (eg \S). 这篇文章非常适合6个字符的转义unicode(例如\\ u00252F),但不适用于5个字符的转义unicode(例如\\ u0000S)。 When I put both of these examples in this unicode converter , they both decode fine. 当我将这两个示例都放在此unicode转换器中时 ,它们都可以正常解码。 I'm not sure what the difference is between the 5 and 6 character codes. 我不确定5和6个字符代码之间有什么区别。

Posting Bergis answer here: 在这里发布Bergis答案:

There are no unicode escapings with 5 characters. 没有5个字符的Unicode转义。 It's \%+2F, which translates to %2F, which you can URI-decode to /. 它是\\ u0025 + 2F,它转换为%2F,您可以将其URI解码为/。 That's what the answer you linked does. 这就是您链接的答案。 \S is totally nonsensical, a NULL followed by S \\ u0000S完全是荒谬的,NULL后跟S

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM