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

encoding.convert() no output file #14

Open
hihell opened this issue Dec 11, 2015 · 3 comments
Open

encoding.convert() no output file #14

hihell opened this issue Dec 11, 2015 · 3 comments

Comments

@hihell
Copy link

hihell commented Dec 11, 2015

cpath = '/root/somedir/test.txt'
print encoding.convert(cpath)

output:
/root/somedir/test_utf-8.txt

but there is no test_utf-8.txt file under /root/somedir

@cychiang
Copy link
Contributor

@hihell

Hi! I have spent some time to take a look on this issue. I found that the reason to cause this problem is "iconv" command. This GNU tool can helps user to convert their file's encoding type from one to another.

The "encoding.convert" of "mafan library" is a wrapping function of iconv to make it easier to use. Basically, the whole process of "encoding.convert" function is detecting the encoding type of input file and convert its encoding type from detected type to UTF-8 by using "iconv" command.

I will start to find a solution to patch this issue.

@cychiang
Copy link
Contributor

Update:
I have sent a pull request to patch this issue. #19

@hermanschaaf
Copy link
Owner

We merged @cychiang's pull request, so we can close this issue if the problem is solved now 👍

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

3 participants