NodeJS encodeURI为ß产生错误的结果

时间:2011-08-05 14:18:13

标签: javascript node.js encodeuricomponent

我正在使用Javascript的encodeURI / encodeURIComponent来编码包含德语“ß”-letter的字符串。

不幸的是,nodejs将β编码为%EF%BF%BD,而不像Firefox那样:%C3%9F

因此,我尝试与之通信的服务器无法给我正确的结果。

是否有更改encodeURI行为的选项?也许是一些问题或什么?

感谢。

1 个答案:

答案 0 :(得分:1)

它将它解释为非法字符(\ uFFFD),其中utf-8是EF BF BD。

据我所知,快速浏览一下这种劝阻http://groups.google.com/group/nodejs/browse_thread/thread/239f40df6036095d?pli=1, V8可能存在问题