In my IBM mobile first application, I am facing an issue with JSON response containing Vietnamese characters (e.g. Tôi là một nhân vật đặc biệt) on Windows 8.1 Phone.
The character encoding I am using is UTF-8.
resourceRequest.send($scope.dataToSendArr).then($rootScope.success, $rootScope.fail);
After this line, the code stops functioning and neither calls the success nor fail functions, nor enters the catch block. Everything works fine when I send JSON in English without Vietnamese characters.
The JSON response with Vietnamese characters works perfectly on Android and iOS platforms.
How can I ensure support for Vietnamese characters or special characters in JSON responses on Windows 8.1 Phone?
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');
//Code becomes unresponsive after this line.
resourceRequest.send($scope.dataToSendArr).then($rootScope.success, $rootScope.fail);