【问题标题】:IBM Mobile First Vietnamese characters(Special Characters) in JSON not supported in Windows Phone 8.1Windows Phone 8.1 不支持 JSON 中的 IBM Mobile First 越南语字符(特殊字符)
【发布时间】:2017-05-03 06:04:02
【问题描述】:

在我的 IBM 移动优先应用程序中,Windows 8.1 Phone 中带有越南语字符的 JSON 响应(例如:Tôi là một nhân vật đặc biệt)不起作用。

我的字符编码是 UTF-8。

resourceRequest.send($scope.dataToSendArr).then($rootScope.success, $rootScope.fail);

这行之后停止工作并且不调用成功或不失败,甚至不进入 catch 块。当我发送没有越南字符的英文 JSON 时,这有效。

它适用于带有越南语字符的 Android 和 iOS。

那么,我将如何在 Windows 8.1 手机中支持越南字符或特殊字符 JSON 响应?

var resourceRequest = new WLResourceRequest("/adapters/save", WLResourceRequest.POST);
resourceRequest.setHeader("Content-Type", "application/json");
resourceRequest.setHeader('Access-Control-Allow-Origin', '*');
resourceRequest.setHeader('Access-Control-Allow-Methods', 'GET, PUT, POST, DELETE, OPTIONS');
resourceRequest.setHeader('Access-Control-Allow-Headers', 'Content-Type, Content-Range, Content-Disposition, Content-Description');

//Gets Unresponsive after this line.               
resourceRequest.send($scope.dataToSendArr).then($rootScope.success, $rootScope.fail);

【问题讨论】:

  • 你能检查一下手机上是否提供越南语支持吗?
  • @VivinK 是的手机支持越南语。

标签: javascript json windows-phone-8 ibm-mobilefirst ibm-mobilefirst-windows


【解决方案1】:

我对西里尔字母也有类似的问题。我处理它的方式是创建自定义编码。请您检查我的方法:Windows Phone 8 SDK WebClient Encoding Issue

编码名称:Windows-1258

【讨论】:

    猜你喜欢
    • 2023-01-26
    • 1970-01-01
    • 2015-03-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-18
    • 2018-04-28
    • 2017-01-24
    相关资源
    最近更新 更多