[ 
http://issues.apache.org/jira/browse/XALANJ-2234?page=comments#action_12358385 
] 

Brian Minchau commented on XALANJ-2234:
---------------------------------------

Albert,
it looks to me like your encoding of Windows-1257 never was accepted. In the 
serializers Encodings.properties file are these lines:
Cp1250 WINDOWS-1250 0x00FF
Cp1251 WINDOWS-1251 0x00FF
Cp1252 WINDOWS-1252 0x00FF

Windows-1257 is not in that file, and was never supported. It is just that 
early versions (earlier than 2.7) didn't warn you.

The behavior then defaults to UTF-8 as the output encoding.  The message is a 
little wrong, but I'm sure that
those characters are not in the UTF-8 encoding, unfortunately the message says 
not in Windows-1257.

Old behavior (before 2.5.2) was to ignore the fact that the characater was not 
in the encoding, 
no message, no error, just write it out as-is and hope for the best.

For a while, 2.5.2 and up, if a character was not in the encoding, an exception 
was thrown, kiling the transformation.

In 2.7, the developer who had the bad idea to throw an exception decided that a 
warning was better than an
exception that kills the transformation, and the transformation runs to 
completion, as before, but with the warnings.

I was that developer.  :-(

The real problem here is that Windows-1257 is not in the Encodings.properties 
file. 

> Problems with output encoding for text output
> ---------------------------------------------
>
>          Key: XALANJ-2234
>          URL: http://issues.apache.org/jira/browse/XALANJ-2234
>      Project: XalanJ2
>         Type: Bug
>     Versions: 2.5, 2.6, 2.7
>  Environment: Windows XP SP2
>     Reporter: Albert Tumanov
>  Attachments: test.xml, test.xsl
>
> Unable to transform correctly XML file in UTF-8 encoding to text file in 
> Windows-1257 encoding.
> java -Xbootclasspath/p:xalan.jar;xml-apis.jar;xercesImpl.jar;serializer.jar 
> org.apache.xalan.xslt.Process -V -DIAG -IN test.xml -XSL test.xsl -OUT 
> test.txt
> >>>>>>> Xalan Version Xalan Java 2.7.0, <<<<<<<
> Warning:  The encoding 'Windows-1257' is not supported by the Java runtime.
> Attempt to output character of integral value 326 that is not represented in 
> spe
> cified output encoding of Windows-1257.
> Attempt to output character of integral value 353 that is not represented in 
> spe
> cified output encoding of Windows-1257.
> Attempt to output character of integral value 299 that is not represented in 
> spe
> cified output encoding of Windows-1257.
> Attempt to output character of integral value 381 that is not represented in 
> spe
> cified output encoding of Windows-1257.
> Attempt to output character of integral value 353 that is not represented in 
> spe
> cified output encoding of Windows-1257.
> Attempt to output character of integral value 257 that is not represented in 
> spe
> cified output encoding of Windows-1257.
> Attempt to output character of integral value 316 that is not represented in 
> spe
> cified output encoding of Windows-1257.
> Attempt to output character of integral value 299 that is not represented in 
> spe
> cified output encoding of Windows-1257.
> Attempt to output character of integral value 257 that is not represented in 
> spe
> cified output encoding of Windows-1257.
> Attempt to output character of integral value 362 that is not represented in 
> spe
> cified output encoding of Windows-1257.
>  --------- Transform of test.xml via test.xsl took 171 ms

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to