Bug 44047

Summary: Default encoding of zipped file names option needed.
Product: [Applications] ark Reporter: Andrey Cherepanov <sibskull>
Component: generalAssignee: Harald Hvaal <metellius>
Status: RESOLVED WORKSFORME    
Severity: wishlist CC: rakuco, web.hijacker
Priority: NOR    
Version: 2.1.9   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Ark fails to parse the filename correctly openning this rar archive
unzip -v works OK
ark shows russian names incorrectly
ark failed to show or extract file

Description Andrey Cherepanov 2002-06-18 09:44:58 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           ark
Version:           v2.1.9 (using KDE 3.0.0 )
Severity:          wishlist
Installed from:    Red Hat Linux 7.2.92
Compiler:          gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-109)
OS:                Linux (i686) release 2.4.7-10
OS/Compiler notes: 

I work with Windows archives and when I try to open archive with cyrillic names (cp1251) I see these names in wrong encoding. Ãontrariwise I need create archives with russian filenames that full compatible with Window's users. 
Please add configuration option in which I can choose default reading/storing filename encoding. But filenames must be converting from this encoding and displayed according locale settings (I use koi8-r).

Thanks.

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 Andrey Cherepanov 2004-04-27 15:12:01 UTC
I guess the best way to work with archive - put default charset combobox into application setting dialog. After defining CP866 (damn! Qt ins't implement this charset still!) ALL zip archives must read/write filenames in this codepage.
Comment 2 Helge Hielscher 2004-04-27 15:35:36 UTC
Well the preferences are fine for the default, but I would like to have the encoding options in the file menus like in Kate.
Comment 3 Andrey Cherepanov 2004-04-27 16:05:46 UTC
> Well the preferences are fine for the default, but I would
> like to have the encoding options in the file menus like in Kate.
Ok! Need to select charsets for file names in archive both ways. Possible, I 
can do patch for implement this behavior. :)

Comment 4 Henrique Pinto 2004-05-27 17:59:47 UTC
> Possible, I 
> can do patch for implement this behavior. :) 

If you do this, I'll hapilly consider commiting it.
Comment 5 Helge Hielscher 2004-09-09 12:22:36 UTC
note: krename has a file encoding plugin
Comment 6 Andrey Cherepanov 2004-09-09 13:54:07 UTC
Why I should be use krename, if I only need simple view and extract files? It's not good usability behaviour. 
Comment 7 Vitaly Lipatov 2005-07-11 12:30:08 UTC
1. There was a patch for cp866 encoding, but it was dropped :(
2. We have to assume default filename encoding in archive according to current locale (use natspec library for it).
Comment 8 spiritus 2006-08-28 23:06:12 UTC
So how about fixing the problem? It's there for over 4 years. I'm also unable to open files with the russian names in Ark/KDE-3.5.2, although system locale is ru_RU.CP1251...
Comment 9 Andrey Cherepanov 2006-08-29 10:25:08 UTC
I work on patch. :)
Comment 10 Mojo 2006-09-14 14:01:56 UTC
Created attachment 17768 [details]
Ark fails to parse the filename correctly openning this rar archive

There are problems openning rar archive with ark. The ark filenames are in the
wrong encoding, so extract/view/etc activities fail.
Comment 11 Leonid Morgun 2007-02-28 16:44:45 UTC
It's necessary feature. To view files in archive created under Windows with cp1251, in Linux with UTF8-RU.ru.
Comment 12 jeff.j.chapman 2007-03-01 06:47:21 UTC
This bug, if fixed, should be extended to all encodings. Not just russian. Japanese, Big5... any encoding.
Comment 13 shattered 2007-07-29 17:38:31 UTC
Andrey: any progress on the patch?
Comment 14 Andrey Cherepanov 2007-07-30 09:12:56 UTC
I stop make patch for ark because I use ALT Linux with unrar and patched unzip. These programs autodetect encoding by system locale and ark show cyrillic filenames without problem.
Comment 15 shattered 2007-07-30 14:16:39 UTC
Can you provide links to these patched versions?
Comment 16 Andrey Cherepanov 2007-07-30 14:31:51 UTC
ftp://ftp.altlinux.ru/pub/people/lav/unzip
Comment 17 Alex Masterov 2007-09-02 12:09:18 UTC
Hi!

I use FreeBSD with ru_RU.KOI8-R locale and Fedora Core with ru_RU.UTF8 locale.
On both systems ark works wrong with zip archives containing russian filenames.
Under FC zip & unzip patched with patch from rusxmms project.
File-roller from Gnome works OK.
unzip isn't cause of this: files were packed under the same encoding and in command line unzip -v shows filenames correctly.
(see attachment)
But it seems that ark opens it in wrong charset (like latin-1 or similar)
(see attachment)
Ark unable to unarchive or see files with russian names in archive, but in temp dir they exist!
(see attachment)
Comment 18 Alex Masterov 2007-09-02 12:12:14 UTC
Created attachment 21528 [details]
unzip -v works OK

This shows that unzip is not cause.
Comment 19 Alex Masterov 2007-09-02 12:21:43 UTC
Created attachment 21529 [details]
ark shows russian names incorrectly
Comment 20 Alex Masterov 2007-09-02 12:25:12 UTC
Created attachment 21530 [details]
ark failed to show or extract file
Comment 21 Raphael Kubo da Costa 2009-04-04 05:03:04 UTC
I was able to open and extract the attachment in comment 10 without any problems here (Ark trunk, future KDE 4.3). I'm using UTF-8 here.

So I'm closing this bug as WORKSFORME. If anyone using another encoding manages to make the bug happen, please reopen the report.