harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Deakin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6290) BufferedReader.readLine() breaks at EBCDIC newline, violating the spec
Date Wed, 05 Aug 2009 13:22:14 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739480#action_12739480

Oliver Deakin commented on HARMONY-6290:

Ok, I see where you're coming from now - I altered the test to read the file byte by byte
rather than a line at a time, and BufferedReader is getting an LF character (0x0A) in place
of NEL from the InputStreamReader on the RI, but not on Harmony. This behaviour is the same
on both zOS and Windows, so I think you are correct in saying that the decoder for EBCDIC
should map NEL to LF.

I will take a look at InputStreamReader and see if I can fix the behaviour there. For now
I will revert my original commit and add your test case to the suite.

> BufferedReader.readLine() breaks at EBCDIC newline, violating the spec
> ----------------------------------------------------------------------
>                 Key: HARMONY-6290
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6290
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: SVN Revision: 800827
>            Reporter: Jesse Wilson
>         Attachments: readLine_no_EBCDIC.patch
>   Original Estimate: 0.33h
>  Remaining Estimate: 0.33h
> The spec says that BufferedReader.readLine() considers only "\r", "\n" and "\r\n" to
be line separators. We must not permit additional separator characters. I admit that the RI's
behaviour is surprising, and incompatible with it's own Pattern and Scanner classes. But this
is the specified behaviour; the doc explicitly calls out which character sequences are used
as newlines. It does not permit additional characters to break lines. 
> For users reading EBCDIC-encoded files, a better practice is to read through the files
using a Scanner. That way, the application will behave the same when executed on either Harmony
or on the RI.
> #Android

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

View raw message