Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
5.4
-
None
-
Windows (probably linux too but most systems run with utf-8)
Description
Tapestry reads tml files in XMLTokenStream.openStream(), does some doctype "magic" and writes all the file content's into a ByteOutputStream. On T5.3 reading/writing was done using the system's caracter encoding. With T5.4 that was changed for the reader but not for the writer. This messes up all non-ascii characters if system encoding is not utf-8.
Solution: Change
PrintWriter writer = new PrintWriter(bos);
To
PrintWriter writer = new PrintWriter(new OutputStreamWriter(bos, "UTF8"));
in XMLTokenStream.openStream().
TODO: Unit test for XMLTokenStream (follows soon)
Attachments
Attachments
Issue Links
- duplicates
-
TAP5-1778 Template parsing dependent on JVM default charset
-
- Closed
-
- is duplicated by
-
TAP5-1741 Parsing template which contains Chinese (Maybe other double bytes) words throws MalformedByteSequenceException: Invalid byte 3 of 3-byte UTF-8 sequence.
-
- Closed
-
-
TAP5-1778 Template parsing dependent on JVM default charset
-
- Closed
-
- is related to
-
TAP5-2293 Closure minimizer produces invalid output on non-UTF-8 systems
-
- Closed
-
- relates to
-
TAP5-1741 Parsing template which contains Chinese (Maybe other double bytes) words throws MalformedByteSequenceException: Invalid byte 3 of 3-byte UTF-8 sequence.
-
- Closed
-