commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COMPRESS-114) determine name for TarEntries with special characters in TarUtils.parseName
Date Mon, 17 May 2010 14:56:43 GMT

    [ https://issues.apache.org/jira/browse/COMPRESS-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868244#action_12868244
] 

Sebb commented on COMPRESS-114:
-------------------------------

Turned out to be easy to fix the round-trip problem - just ensure that the byte entries are
treated as unsigned.
So no need to worry about charsets.

Still need to check that this works OK when reading from the test tar file.

> determine name for TarEntries with special characters in TarUtils.parseName
> ---------------------------------------------------------------------------
>
>                 Key: COMPRESS-114
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-114
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Windows/Suse
>            Reporter: Helmut Minst
>         Attachments: plusMinusForJIRAwithLicense.tar, TarArchiveEntry.java, TarArchiveInputStream.java,
TarUtils.java
>
>
> if a tarfile contains files with special characters, the names of the tar entries are
wrong.
> example:
> correct name: 0302-0601-3±±±F06±W220±ZB±LALALA±±±±±±±±±±CAN±±DC±±±04±060302±MOE.model
> name resolved by TarUtils.parseName: 0302-0101-3ᄆᄆᄆF06ᄆW220ᄆZBᄆHECKMODULᄆᄆᄆᄆᄆᄆᄆᄆᄆᄆECEᄆᄆDCᄆᄆᄆ07ᄆ060302ᄆDOERN.model
> please use: 
> result.append(new String(new byte[] { buffer[i] }));
> instead of: 
> result.append((char) buffer[i]);
> to solve this encoding problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message