[ 
https://issues.apache.org/jira/browse/CB-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13730760#comment-13730760
 ] 

Andrew Grieve commented on CB-4487:
-----------------------------------

Okay, think I understand.

The file API is agnostic to the data that it is dealing with. E.g. seek(4) 
means 4 *bytes*, and truncate(11) means 11 *bytes*.

It sounds like you want to deal with characters and not bytes, so maybe a 
better approach would be to read the entire file (or chunk) as a string, and 
use JS's string methods to figure out how many bytes are involved. Note that 
this will also depend on what character encoding you're using in your file.


                
> phonegap 2.9 file api's big5 or utf8 split character problem
> ------------------------------------------------------------
>
>                 Key: CB-4487
>                 URL: https://issues.apache.org/jira/browse/CB-4487
>             Project: Apache Cordova
>          Issue Type: Wish
>          Components: Android
>    Affects Versions: 2.9.0
>         Environment: Android 4.03 HTC Sensation XL
>            Reporter: Colin Bau
>            Assignee: Joe Bowser
>              Labels: cut, lebgth, seek
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> all the content in the web address
> https://groups.google.com/forum/#!topic/phonegap/-kozb7jlhqk

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to