Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

File.read().text truncate file content

$
0
0

I have a UTF-8 file and using the following codes to get the file content.

var file = Ti.Filesystem.getFile('myfile.html');
var htmlContent = file.read().text;
Ti.API.debug(htmlContent);
It works fine until I have a file containing the LINE SEPARATOR, i.e. Unicode: U+2028 or UTF-8(hex.): e2 80 a8

The printout of htmlContent shows that text after LINE SEPARATOR are all truncated.

Why and how to fix this without modifying the file?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>