如果我试图把一个URL与重音字符的功能,如Percepção时,输出Percep%C3%A7%C3%A 3 O,而无法正常工作。然而,Percep%E7%e3o做工作的方式是应该的。
If I try to put a URL in the function with accented characters, like "Percepção", it outputs "Percep%C3%A7%C3%A3o", which doesn't work correctly. However, "Percep%e7%e3o" does work the way it should.
String Result = Uri.EscapeUriString("Percepção");
在此先感谢。
Thanks in advance.
我只是第一次编码原始字符串为ASCII字节,然后编码回UTF8修复了这个问题。
I just fixed this issue by encoding the original string to ASCII bytes first, and then encoding it back to UTF8.
String Result = Uri.EscapeUriString(Encoding.UTF8.GetString(Encoding.ASCII.GetBytes("Percepção")));
由于二进制codeR一些更多的细节。
Thanks to binarycoder for some more details.
上一篇:Android的Java的JNI和C字符数组无法识别的价值数组、字符、无法识别、价值
下一篇:Android的发布到Facebook墙,stream.publish因为几天破几天、Facebook、Android、publish