You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Gilbert, Antoine" <AG...@korem.com> on 2006/02/24 15:43:44 UTC
commons-compress
Hi
I'm trying the common-compress objects, but I'm unable to make it works
as expected.
I have filenames with special characters (French accents) to compress
(base zip format), I set the encoding as UTF-8 but my filenames are
getting wrong in the archive.
Here is how I init my stream
zos = new ZipOutputStream(new FileOutputStream(file));
zos.setEncoding("utf-8");
zos.setMethod(zos.DEFLATED);
zos.setLevel(5);
Does I'm doing something wrong ?
Antoine
Re: commons-compress
Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Gilbert!
> I have filenames with special characters (French accents) to compress
> (base zip format), I set the encoding as UTF-8 but my filenames are
> getting wrong in the archive.
>
I am definitely not sure about what I say now, but I think it is not
possible to use UTF-8 encoding by default?
Its sort of non standard extension.
At least your "unzip" have to know how to deal with, maybe yours is not
capable to handle these utf-8 encoded strings.
If possible try using a non multibyte encoding.
Or correct me if I am wrong :-)
Ciao,
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: commons-compress
Posted by "C. Grobmeier" <gr...@possessed.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Antoine,
> I have filenames with special characters (French accents) to compress
> (base zip format), I set the encoding as UTF-8 but my filenames are
> getting wrong in the archive.
i just checked the code and it looks like the setEncoding/getEndcoding
methods are just used to get the correct filenames from the harddisk.
It's not implemented for naming the files within the zip-file.
I think its a good thing to have a new issue about this in bugzilla.
If you don't open it, i will do later.
At the moment i am afraid i have no solution for this.
Regards,
Chris
> Here is how I init my stream
> zos = new ZipOutputStream(new FileOutputStream(file));
> zos.setEncoding("utf-8");
> zos.setMethod(zos.DEFLATED);
> zos.setLevel(5);
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD4DBQFEAy5Vkv8rKBUE/T4RAlYhAJUalE2gBb2J9kkOtr9kyaInCN5FAKCEwgq0
13l3BQxcDHsj/Pe+DR36aw==
=WGQL
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org