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

The problem of coverting filename with the Chinese character #49

Open
mintow opened this issue Aug 28, 2018 · 0 comments
Open

The problem of coverting filename with the Chinese character #49

mintow opened this issue Aug 28, 2018 · 0 comments

Comments

@mintow
Copy link

mintow commented Aug 28, 2018

My MediaWiki has so many pages with Chinese character.
Running yamdwe.py, and I got an error:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 5: ordinal not in range(128)

I added some code as follow:
dokuwiki.py about L87
full_title = full_title.decode('utf-8')
wikicontent.py about L180
pagename = pagename.decode('utf-8') text = text.decode('utf-8')

And I got another error:

UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)

I think it's because of the Chinese character in pagename/titlename.
I also failed when replace the decode() with urllib.quote(),
Do you have any other suggestions?

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

1 participant