You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Leandro Reis (JIRA)" <ji...@apache.org> on 2015/03/11 03:07:38 UTC

[jira] [Issue Comment Deleted] (IO-471) Support for additional encodings needed in ReversedLinesFileReader

     [ https://issues.apache.org/jira/browse/IO-471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leandro Reis updated IO-471:
----------------------------
    Comment: was deleted

(was: Additional test files)

> Support for additional encodings needed in ReversedLinesFileReader
> ------------------------------------------------------------------
>
>                 Key: IO-471
>                 URL: https://issues.apache.org/jira/browse/IO-471
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.4
>            Reporter: Leandro Reis
>             Fix For: 2.5
>
>         Attachments: commons-io-reversedlinesfilereader-ccjk-encodings.txt, test-file-gbk.bin, test-file-windows-31j.bin, test-file-x-windows-949.bin, test-file-x-windows-950.bin
>
>
> I¹m working on a product that uses Commons IO via Jackrabbit Oak. In the
> process of testing the launch of such product on Japanese Windows 2012
> Server R2, I came across the following exception:
> "(java.io.UnsupportedEncodingException: Encoding windows-31j is not
> supported yet (feel free to submit a patch))"
> windows-31j is the IANA name for Windows code page 932 (Japanese), and
> is returned by Charset.defaultCharset(), used in org.apache.commons.io.input.ReversedLinesFileReader [0].
> This issue can be resolved by adding a check for
> 'windows-31j' to ReversedLinesFileReader.
> The attached patch includes such addition, as well as those needed to support Chinese Simplified, Chinese Traditional and Korean. 
> A newline byte can never appear as part of a multi-byte character in any
> of those encodings. 
> - Japanese: http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT
> - Simplified Chinese: http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP936.TXT
> - Korean: http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP949.TXT
> - Traditional Chinese: http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)