Facebook 连接 FBJS 缺少重音字符

发布于 2024-08-15 02:54:50 字数 193 浏览 0 评论 0原文

我使用 FBJS FB.Connect.streamPublish。 《你在想什么?》的内容字段由我的代码填充,并包含重音字符。在 IE 上看起来不错。在 FireFox 上,重音字符不会显示。

消息上的警报(消息)显示它确实包含丢失的字符,但它不会显示在 FB 对话框上。

关于如何解决这个问题有什么建议吗?

谢谢。 尼罗

I use FBJS FB.Connect.streamPublish. The content of 'What's on your mind?' field is filled by my code and includes accented characters. On IE it appears fine. On FireFox the accented character do not show.

alert (message) on the message shows that it does include the missing character but it does not show up on FB dialog.

Any advice on how to solve this?

Thanks.
Niro

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

愛放△進行李 2024-08-22 02:54:50

似乎 FB.Connect.streamPublish 的第一个参数需要在 Firefox 中采用 UTF8 才能显示重音字符。转换为UTF8可以这样实现:
unicodestr =unescape(encodeURIComponent(str));

请注意,只有 Firefox、Chrome 和 Safari 才需要它,并且会弄乱 IE 中的字符串。

Seems like the first parameter of FB.Connect.streamPublish needs to be in UTF8 in Firefox to display accented characters. Converting to UTF8 can be achived like this:
unicodestr =unescape( encodeURIComponent( str ));

Note it is needed only for Firefox, Chrome and Safari and will mess the string in IE.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文