Skip to content

2dxutils: UnicodeDecodeError: 'ascii' #79

Description

@QingQiz

the encoding in these two line should be shift-jis

self.__name = name.split(b"\x00")[0].decode("ascii")

name = self.__name.encode("ascii")

example:

$ cat 22024.2dx| xxd | head -n 5
00000000: 3232 3032 345f 97f6 82cd 9492 91d1 5f62  22024_........_b
00000010: dc0c 0000 2503 0000 ffff ffff 0000 0000  ....%...........
00000020: 0000 0000 00b2 3502 fcf4 1800 0500 0000  ......5.........
00000030: ffff ffff ac54 6577 0000 0000 0000 0000  .....Tew........
00000040: 0000 0000 c054 6577 dc0c 0000 4e2f 5800  .....Tew....N/X.

The filename cannot be decoded/encoded by ascii but can be decoded by shiftjis as 22024_恋は白帯

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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