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

[Question] is there support for "utf-8-sig" ? #45

Closed
david-vicente opened this issue Sep 4, 2020 · 2 comments
Closed

[Question] is there support for "utf-8-sig" ? #45

david-vicente opened this issue Sep 4, 2020 · 2 comments

Comments

@david-vicente
Copy link

david-vicente commented Sep 4, 2020

I'm trying to read a file that if the encoding selected is enc"UTF-8" it starts with "\ufeff". In Python the solution was to use "utf-8-sig" .

@nalimilan
Copy link
Member

AFAICT iconv doesn't support that. I guess we could special-case that encoding and remove the '\ufeff' byte-order mark if it's present, but that wouldn't be super pretty. It will be simpler for you to just skip the first character (then you don't even need StringEncodings).

@david-vicente
Copy link
Author

It will be simpler for you to just skip the first character (then you don't even need StringEncodings).

That's what I ended up doing, thanks!

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