开发者

NodeJS encodeURI produces wrong result for ß

I am using Javascript's encodeURI / encodeURIComponent to encode a string containing the german "ß"-letter.

开发者_开发技巧

Unfortunately nodejs encodes ß as %EF%BF%BD and not like for example Firefox does: %C3%9F

thus the server i am trying to communicate with cannot give me correct results.

Is there an option for changing how encodeURI behaves? maybe some utf-problem or something?

Thanks.


It's interpreting it as an illegal character (\uFFFD) which in utf-8 is EF BF BD.

As I understand from a quick glance over this disscution http://groups.google.com/group/nodejs/browse_thread/thread/239f40df6036095d?pli=1 , there might be an issue with V8

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜