Skip to content

The problem of coverting filename with the Chinese character #49

Description

@mintow

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions