You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/06/15 19:06:37 UTC
[Bug 2194] New: - Xerces2: problems using OneCharReader
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2194
*** shadow/2194 Fri Jun 15 10:06:37 2001
--- shadow/2194.tmp.22951 Fri Jun 15 10:06:37 2001
***************
*** 0 ****
--- 1,37 ----
+ +============================================================================+
+ | Xerces2: problems using OneCharReader |
+ +----------------------------------------------------------------------------+
+ | Bug #: 2194 Product: Xerces2-J |
+ | Status: NEW Version: 2.0.0 [alpha] |
+ | Resolution: Platform: All |
+ | Severity: Blocker OS/Version: All |
+ | Priority: Other Component: Other |
+ +----------------------------------------------------------------------------+
+ | Assigned To: xerces-j-dev@xml.apache.org |
+ | Reported By: gmarcy@us.ibm.com |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ As indicated in a comment in XMLEntityManager, there are buffering problems when
+ wrapping up the Reader classes in the JDK. I currently ran into the case where
+ a Reader is created for an InputSource with the encoding set to "ISO-8859-1",
+ and where the XMLDecl EncodingDecl was encoding="iso-8859-1". While in this
+ case the simplest fix is to change line 1637 from:
+
+ if (fCurrentEntity.encoding != null &&
+ fCurrentEntity.encoding.equals(encoding)) {
+
+ to
+
+ if (fCurrentEntity.encoding != null &&
+ fCurrentEntity.encoding.equalsIgnoreCase(encoding)) {
+
+ there are certainly other circumstances when the JDK Reader is used and data is
+ lost due to buffering assumptions. There is an implication in the comment above
+ this line of code that the JDK Readers are deficient for buffering the data that
+ OneCharReader is accessing, but since the JDK Readers are "buffered readers" it
+ would actually be a deficiency if they DIDN'T buffer the data. IMHO, the
+ current implementation of wrapping streams and readers needs to be replaced with
+ a more robust solution to this problem.
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org