Bug 40455 - ReaderInputStream handling character sets having preamples incorrect;ly
Summary: ReaderInputStream handling character sets having preamples incorrect;ly
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.8.2
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-10 11:51 UTC by Peter Reilly
Modified: 2010-12-27 11:12 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Reilly 2006-09-10 11:51:50 UTC
Some character sets have a preample - for example
utf-16 which has a BOM indicator. ReaderInputStream
does not handle this because it restarts the
stream for each block read in:

in readBytes:
            if (n > 0) {
                slack = new String(buf, 0, n).getBytes(encoding);
                begin = 0;
            }
The String.getBytes does the encoding, but it can
be called a number of times.