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

Problem with error return from iconv (was: feature_request: log both args) #145

Open
sergey-safarov opened this issue Apr 6, 2018 · 2 comments

Comments

@sergey-safarov
Copy link

some program use this app to decoding emails.
in program log i see errors like {bad_charset,<<"UTF-8">>} generated by this module while called decode/1 function .
I looked to source and find that this error is generated from convert/1 and decode_body/4 while called iconv:open/2
I sure, From charset UTF-8 is correct.
I sure, wrong value in To charset. But this is not displayed in error message.
Could you add To value to error message

@sergey-safarov sergey-safarov changed the title fedure_request: log both args feature_request: log both args Apr 6, 2018
@sergey-safarov
Copy link
Author

sergey-safarov commented Apr 6, 2018

This happens because //IGNORE encodings is not supported by iconv on Alpine OS

bash-4.4# iconv -t "utf-8//IGNORE" -f "UTF-8" /tmp/aa.txt
iconv: destination charset utf-8//IGNORE: Invalid argument
bash-4.4# 
bash-4.4# cat /etc/os-release 
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.7.0
PRETTY_NAME="Alpine Linux v3.7"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"

@mworrell
Copy link
Collaborator

Isn't this a problem in iconv?

@mworrell mworrell changed the title feature_request: log both args Problem with error return from iconv (was: feature_request: log both args) Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants