我刚刚为我的 HEBREW 网站编写了用于快速结帐的 php 脚本(数据库编码为 latin_swedish_ci,浏览器编码为 windows-1255,文件使用 notepad++ 编码为 ANSI)。
当我将数据(用希伯来语编写)从数据库传递到 paypal 时,我看到的不是文本而是问号。当我在文本上使用 utf8_encode 时,它显示为乱码。
没有 utf8_encode:
使用 utf8_encode:
有什么想法吗?
最佳答案
关键是按照引用的步骤在您的帐户中设置 UTF-8
- Login to your PayPal account
- Navigate to "My Account Overview -> Profile -> My Selling Tools" section. Within "More Selling Tools" click the "PayPal Button Language Encoding" link.
- Ensure that setting for "Your website’s language" is correct.
- Click the "More Options" button, select the "UTF-8" option for "Encoding" and leave the "Yes" option selected for "Do you want to use the same encoding for data sent from PayPal to you (e.g., IPN, downloadable logs, emails)?".
- Click "Save" to save your changes.
您可以选择在 setExpressCheckout API 负载中添加 LocaleCode = he_IL
,将结帐页面语言也更改为希伯来语
关于php - paypal 快速结帐 - 付款页面中的问号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32960382/