Unix Programming - unzip from windows to unix

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > June 2006 > unzip from windows to unix





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author unzip from windows to unix
Rene Grothmann

2006-06-26, 7:20 pm

I have met a strange problem concerning Unix filenames.

I zip a program and data collection for users under windows using the
"zip" command in a shell. There are some files containing national
characters from the character set. Those files are referred to in HTML
pages as parameters of a Java applet.

When users unzip this with "unzip" command, they do not get the right
filenames, since the foreign language characters are not translated
from the windows codepage. However, the file references in the HTML
pages are correctly translated, since I use UTF-8 for the pages, and so
the files are no longer found.

- I would like a better unzip or a parameter to the existing one that
translates the file names correctly.

- Of course, I could also eliminate the national characters from the
file names, making them harder to read for users.

- Or, I could specify the windows code page for the HTML pages, which
is something I do not want to do. And I am not sure, it would work,
since files with Windows characters are strange on Unix anyway.

Any suggestions? Thanks!

Robert Harris

2006-06-27, 7:27 am

Rene Grothmann wrote:
> I have met a strange problem concerning Unix filenames.
>
> I zip a program and data collection for users under windows using the
> "zip" command in a shell. There are some files containing national
> characters from the character set. Those files are referred to in HTML
> pages as parameters of a Java applet.
>
> When users unzip this with "unzip" command, they do not get the right
> filenames, since the foreign language characters are not translated
> from the windows codepage. However, the file references in the HTML
> pages are correctly translated, since I use UTF-8 for the pages, and so
> the files are no longer found.
>
> - I would like a better unzip or a parameter to the existing one that
> translates the file names correctly.
>
> - Of course, I could also eliminate the national characters from the
> file names, making them harder to read for users.
>
> - Or, I could specify the windows code page for the HTML pages, which
> is something I do not want to do. And I am not sure, it would work,
> since files with Windows characters are strange on Unix anyway.
>
> Any suggestions? Thanks!
>


Your problem is not clear.

I suspect that zip and unzip do not translate filenames at all.

Are the files created on a windows system? If so, it needs to use a
UTF-8 codepage. Then everything will use UTF-8 and no code translation
needs to take place.

Robert
Rene Grothmann

2006-06-28, 7:30 am

Windows uses Unicode for file names, first of all. But apparently "zip"
does not, no version of it. I do not know, if it would on Unix systems,
but I think not. But "jar" from the Java package does, so I am using
this now.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com