Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20288] Windows: File.write can't handle UTF-8 string

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-02-01T02:19:28.000+0000
Affected Version/sRelease 5.1.0
Fix Version/sRelease 5.3.0
ComponentsWindows
Labelsqe-5.3.0
ReporterKota Iguchi
AssigneeKota Iguchi
Created2016-01-29T02:00:20.000+0000
Updated2016-04-26T17:28:35.000+0000

Description

Ti.Filesystem.File.write writes wrong UTF-8 data. For instance following code doesn't show the string correctly.
var filePath = Ti.Filesystem.applicationDataDirectory + "test.txt";
var file = Ti.Filesystem.getFile(filePath);
file.write("日本語 : Japanese");
alert(file.read().text);

Comments

  1. Kota Iguchi 2016-01-29

    https://github.com/appcelerator/titanium_mobile_windows/pull/542
  2. Josh Longton 2016-04-26

    Verified as fixed, The string is written and displayed correctly. Tested on: Nokia Lumia 928 (8.1) Windows Simulator (8.1) Microsoft Lumia 640 (10) Windows Simulator (10) Windows 10 Ti SDK: 5.3.0.v20160421080259 Appc NPM: 4.2.5-3 App CLI: 5.3.0-36 Node v4.4.3 *Closing Ticket.*

JSON Source