not extracting files with japanese name

Aug 16, 2011 at 12:31 PM

Hi,

When i run self extractable exe it is not extracting files with japane name but when i click on 'Showcontents' button of exe it is showing files with it's name replaced with '????', please let me know how to extract these files.

Regards,

Santhosh.

 

Coordinator
Aug 21, 2011 at 5:28 PM

Show the code you use to create the self-extracting archive.  If you want Japanese filenames, you will need to use UTF-8 encoding.  Have you done that?  At the time you created the SFX, did you make sure to use UTF-8 encoding for the filenames?  Show your code.

 

Aug 22, 2011 at 7:09 AM

Hi,

Case1:

The following is the code which we used for creating self extractable exe, We didn't used encoding here

Using zip1 As New ZipFile() 
 	zip1.AddDirectory(sMoveDirectory)
	 zip1.Comment = "This will be embedded into a self-extracting exe" 
	Dim sSaveOption As New SelfExtractorSaveOptions
	 sSaveOption.Flavor = SelfExtractorFlavor.WinFormsApplication
	 sSaveOption.Quiet = False
	 zip1.SaveSelfExtractor(StageDir & "\" & sTargetFile & ".exe", sSaveOption) 
End Using
 we didn't got any files after extraction but when we click on 'ShowContents' button of exe we got files with it's part of the name is replaced with '?????'
 
Case2: 
 
The following is the code which we used for creating self extractable exe, we used encoding here
Using zip1 As New ZipFile()

                        zip1.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
                        zip1.AlternateEncoding = Text.Encoding.UTF7

                        zip1.AddDirectory(sMoveDirectory)
                        zip1.Comment = "This will be embedded into a self-extracting exe"

                        Dim sSaveOption As New SelfExtractorSaveOptions
                        sSaveOption.Flavor = SelfExtractorFlavor.WinFormsApplication
                        sSaveOption.Quiet = False

                        zip1.SaveSelfExtractor(StageDir & "\" & sTargetFile & ".exe", sSaveOption)

                    End Using
'sMoveDirectory' directory contains the files with japanese name for example 'Deki Search Test 日本語 エクセル.xls', When we extract files using that exe we got file but with different name 'Deki Search Test +ZeVnLIqe- +MKgwrzC7MOs-.xls'  
actually we want to get the same file with it's original japanese name ('Deki Search Test 日本語 エクセル.xls')   
Can you tell me how to get files with it's original japanese name after extraction

Thank you.
Aug 22, 2011 at 3:40 PM
Have you tried Text.Encoding.UTF8? I am just creating regular zip files with Japanese / Chinese characters and using UTF8 works for me. I am able to unzip the files in its original text.
Actually I did not know how to zip unicode characters until I saw your post using AlternateEncoding, so thanks!
Art
Coordinator
Aug 22, 2011 at 6:59 PM

Use UTF8 encoding.  Check the documentation on AlternateEncoding.  Do not specify UTF7.  Specify UTF8.  Read the documentation to understand why you must use UTF8 and not UTF7.

 

Aug 23, 2011 at 6:25 AM

Thanks Chesso, I used UTF8, It's working fine now..........