[TIMOB-7782] iOS: Able to read UTF-16 encoded text file
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Low |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 1.8.0.1, Release 1.8.1 |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | n/a |
| Reporter | Nikhil Sharma |
| Assignee | Unknown |
| Created | 2012-02-22T17:00:22.000+0000 |
| Updated | 2018-03-06T18:57:57.000+0000 |
Description
One should be able to open, get the content and then display UTF-16 encoded TXT files into a Ti.UI.TextArea. There is a workaround in iPad to read the UTF-16 encoded file with the help of Titanium.UI.iPad.DocumentViewer
Repro Steps
1. Run the below code. 2. Can't read the UTF-16 encoded text file, everything works fine with UTF-8 encoded file.
var win = Ti.UI.createWindow();
var textArea = Ti.UI.createTextArea({width:"100%", height:"100%", backgroundColor:"#FFFFFF"});
textArea.value = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory,"WBCTDOC_806.txt").read().text;
win.add(textArea);
win.open();
Attached is the file which is to be opened.
Attachments
| File | Date | Size |
|---|---|---|
| WBCTDOC_806.txt | 2012-02-22T17:00:22.000+0000 | 204 |
No comments