开发者

Interesting Encoding

I have an interesting promblem with social network http://www.odnoklassniki.ru/. When I use advanced searching my cyrillic symbols are encoded in no understantable symbols for me. For Example: Иван Иванов Encode %25开发者_运维问答D0%25B8%25D0%25B2%25D0%25B0%25D0%25BD%25D0%25BE%25D0%25B2+%25D0%25B8%25D0%25B2%25D0%25B0%25D0%25BD%25D0%25BE%25D0%25B2

Any ideas?


It's a double URL-encoded string. The %25 sequences represent the percent sign. Decoding once gives %D0%B8%D0%B2%D0%B0%D0%BD%D0%BE%D0%B2+%D0%B8%D0%B2%D0%B0%D0%BD%D0%BE%D0%B2.

Decoding again gives the UTF-8 string иванов иванов.


That's URL- or percent- encoding. The percent starts it. Then its the 4 hex-digits for the char. The + is the space.

See: http://en.wikipedia.org/wiki/Percent-encoding


Well, it appears to be twice URL encoded. If we unwrap it once, we get

%D0%B8%D0%B2%D0%B0%D0%BD%D0%BE%D0%B2 %D0%B8%D0%B2%D0%B0%D0%BD%D0%BE%D0%B2

and again, we get

иванов иванов

This appears to be UTF-8 with the bytes encoded separately.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜