Jump to content

Bug with FileReadToArray and _FileReadToArray


Recommended Posts

Although their help for FileReadToArray and _FileReadToArray does not show it, only the initial part of the file they are to read (up to 64KB) is checked (I expect this is for performance reasons) to know what mode to read it in (to determine if it is UTF8 or UTF16) unlike FileOpen which offers $FO_FULLFILE_DETECT to use the entire file.
So when FileReadToArray or _FileReadToArray reads in a large file that is UTF8 for the initial 64KB and further on has UTF16 characters such as a back tick: ` is encountered, they will be "corrupted" into: � 
Ideally this "bug" may be fixed by a feature request to have a $FO_FULLFILE_DETECT parameter (like FileOpen) else perhaps please may an advisory be appended to their help suggesting a manual insertion of a UTF16 character to the beginning of the file to be read in if there's any chance that UTF16 character(s) may be encountered after the initial 64KB so UTF16 will be detected.

 
Edited by Tippex
clarification
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...