error: cannot create Test�.srt Invalid or incomplete multibyte or wide character

created at 08-31-2021 views: 1

Decompression error

Sometimes you will encounter some compressed packages, which will fail to decompress under Linux. The same compressed files can be successfully decompressed under Windows.
Later, I learned that most of the file name character set problems. Contains special characters, Chinese characters and other non-UTF8 characters.

$ unzip -o test.zip 
Archive:  test.zip
Subscene
error:  cannot create Test�.srt
        Invalid or incomplete multibyte or wide character

Invalid or incomplete multibyte or wide characters

$ file Test�.srt
Test�.srt: Unicode text, UTF-8 (with BOM) text, with CRLF line terminators

Solution

The above file is created and compressed in the windows environment. In the linux environment, decompressing this file on the partition where the ntfs is mounted will contain the above error.
The easiest way is to copy it to the ext4 file system, then it can be decompressed normally.
It's just that the file name you will see after decompression will be as follows:

  test�.srt (invalid encoding)

There is an explanation text of (invalid code) after the file name. If you want to keep the abnormal characters, you cannot modify the name.
Just manually modify the file name to only English and numbers.

Please log in to leave a comment.