Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-19-2005, 01:49 AM   #1
LQ Newbie
Registered: Apr 2005
Posts: 6

Rep: Reputation: 0
unzip seems failing to correctly handle chinese character

i have some files that have Chinese file names and i'am using Redhat9 ,and the
system's enviroment is Simplified Chinese .These Chinese-name-files are compressed using rar under windows into zips ,and transfered to my linux .when i unzip them ,the Chinese-filename becomes unreadable .
so where does the problem lie ??
i guess the unzip fail to do a fine job .

Last edited by haodongdong; 04-19-2005 at 01:51 AM.
Old 04-19-2005, 02:13 AM   #2
Simon Bridge
LQ Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
I take it you are manually transferring large files between two machines.

This can be tricky - it could just be that windows is using a different way of encoding the chinese characters - have you tried writing a document with chinese characters, rar-zipping that then transferring and unzipping?

Another thing you could try, is to use pkzip instead of rar to make the zip file.

rar could just be garbling the chinese encoding in the file-names so bzip or gzip (whichever you used) has trouble reading them. Of course, just giving the file an english name and re-writing in chinese characters will also work - if a bit tedious.

A nice test would be to gzip a file in linux which had chinese character filename and then see if it unzipps with chinese under linux (and windows too - i.e. do the transfer the other way before you blame the linux unzipper.)

I'm inclined to think that the handle which tells the unzipper that the filenames should be chinese is just stripped in rar ... because of the way filenames are handled. Especially if the linux environment allows a mixture of chinese and roman character filenames.

OTOH: I've not heard of this before... and I have had no reason to use the simplified chinese environment or chinese characters in filenames.
Old 04-22-2005, 09:58 PM   #3
LQ Newbie
Registered: Apr 2005
Posts: 6

Original Poster
Rep: Reputation: 0
thanks for your response .
I'am sure the rar can unrar the file correctly under Windows .so the Chinese file name is not corrupted. The different encoding maybe the cause of the problem .
I'm a Chinese ,large number of files i encounter daily have Chinese names .I often download zip files from Internet and unzip them under Linux only to get files with unreadable Chinese file names . Do i have to find a Windows System just to unzip a file every time?? so i decided to figure it out .

Last edited by haodongdong; 04-22-2005 at 10:00 PM.
Old 04-23-2005, 04:14 AM   #4
Simon Bridge
LQ Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Well OK - this is why I suggested a string of experiments ...

I still think you should try compressing a file with PK-ZIP under windows and transfer to linux to see what happens. Another trick is to try compressing a file under linux with bzip (alone - do not tar) and transferring to windows to see if the chinese filenames unzip OK. Also check you can unzip that file with bzip OK (this last one will tell you if the problem lies with bzip).

In linux, you have a native chinese system (yes/no?) so I'm not familiar with this system - having only worked with chinese language in a native english system.

1. update bzip anyway - make sure you have the latest version.

2. go through your character settings to make sure everything is encoding properly

3. try something obvious - sometimes you can highlight a string that is supposed to be chinese and change the coding so it displayes chinese characters.

4. you have simplified chinese - you could change to traditional

5. download and install the microsoft chinese character fonts ...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How does linux handle ansi code correctly? twirl Programming 1 09-30-2005 09:03 AM
My system can't display chinese correctly! lonelyghost317 Linux - Software 1 06-29-2005 09:26 PM
KDE cannot display Chinese correctly cawwt Mandriva 0 05-07-2005 01:06 PM
Chinese Character display firefox/mozilla crnchyfrog Linux - Software 6 10-10-2004 11:30 PM
chinese character input and display -- need help carboncopy Slackware 5 07-06-2004 09:12 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration