Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility of setting input encoding for CSV #139

Open
kAlvaro opened this issue Nov 7, 2017 · 2 comments
Open

Possibility of setting input encoding for CSV #139

kAlvaro opened this issue Nov 7, 2017 · 2 comments

Comments

@kAlvaro
Copy link

kAlvaro commented Nov 7, 2017

Unless I'm missing something there's no way to specify the input encoding of CSV files. The \SpreadsheetReader_CSV::$Encoding property is private, it's set in the constructor if Unicode BOM is found and defaults to UTF-8.

I understand it isn't a big problem if both data and app use the same encoding (no conversion will happen) but you will fail to get UTF-8 output as per the docs, which can be confusing. If encoding is not the same I guess you may get random conversions, which is worse.

@erikas-tranauskas
Copy link

I have same problem with XLS file encoding. It converts the file to UTF-8 by default, but I get a loss of data when reading a XLS file saved in CP-1252 encoding.

@kAlvaro
Copy link
Author

kAlvaro commented Nov 21, 2017

@The50 I'm not familiar with XLS internals but I believe encoding information is stored within the file, thus you don't need to set it manually. If it doesn't work then it's a bug but it should probably have its own ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants