ñ̴̥o̴t̶͎h̵ï̸̘n̷̩ģ̸̥ ̵̳ẗó̶̡ ̴̫͔ś̷̗e̶ė

Unpacking archives with files that have japanese names.

I want to share a method that I use to batch unpack archived games.

Usually people suggest you to install AppLocale or some alternative of it, or install japanese language support on windows. But nothing of this will work for unpacking archives.

Even If the files in the archives (file names) looks corrupted and their names looks like garbage - there is nothing wrong with them and they are perfectly fine - this is just how windows sees them. And if you just unpack it using the windows methods (like drag'n'drop) names of these files become actually corrupted which can lead to game engine being unable to read them. Well, such unpacking damage only names of files, it cannot change the contents of a file... and theoretically you can just rename "corrupted" files by hand if you lost the source archive from your storage, but this can be a real painful process.

The problem is the file names is using japanese codepage 932, and you need to tell your archive program to use it while unpacking.

I will use 7zip commandline features for this and I suggest you to use 7zip, don't know if the other archive programs can do this - never used any other before. Also, instead of using the commandline parameters just once and only for one file, I have create a little script that will unpack all of your files into one folder.

This script SHOULD BE placed in the separate folder where no other files besides the archives itself, because it goes through ALL files in the folder, searching for supported by the 7z file formats (i.e. 7z, zip, rar etc.)!

Open you notepad, then copy-paste these lines, then save it as file with .bat extension:

@Echo off
SET source=%CD%
break>%CD%\Log.txt 
FOR /F "TOKENS=*" %%G IN ('DIR /A:-D /B %source%') DO " *PATH TO YOUR 7z.exe* " x "%source%\%%~nG%%~xG" -mcp=932 -o"_Unpacked\%%~nG\" -y -bb0 >>%source%\Log.txt 2>&1

Where *PATH TO YOUR 7z.exe* should be replaced with the actual path to where 7z was installed, i.e. C:\Program Files\7-Zip\7z.exe if 7zip have been installed in the default folder.

Next, the -mcp=932 is the most important line, it tells 7zip to use the 932 codepage. By changing the number you can also extract correctly files, named using other country symbols. So, for example: scandinavian codepage is 865, russian is 20866 and chinese is 936. The full list of codepages can be found easily on the Internet, here's a Wikipedia article with list of Windows codepages: https://en.wikipedia.org/wiki/Windows_code_page I believe it is also depends on the OS on which it was archived, and if there are still gibberish - try another codepage. By removing mcp line the script will unpack files with "regular" english names - so it becomes just a batch unpacking script. Probably, by default it uses the codepage set in your system, but I am not sure about this as well.

The unarchived files go into the _Unpacked folder, but you can change it to your liking as well.

Also it creates a log file to see, if something got wrong.

Thoughts? Leave a comment

Comments
  1. nothingtoseeDec 22, 2025:

    I've also made a yt video demonstration on how it works.