velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <shinobu.ka...@gmail.com>
Subject Re: byte order mark and InputStreamReader problem
Date Mon, 02 May 2005 19:01:31 GMT
Hi Jian,

> I created a template in UTF8 encoding on my windows machine. When I
> rendered it on the web, the browser connected to the server fine but
> then it waited infinitely.
> 
> I then modified the problematic template and got rid of the byte order
> mark (BOM) at the very beginning of the template. This time, the page
> loaded  successfully in the browser.
> 
> What I am getting at is, Velocity uses java.io.InputStreamReader, and
> given UTF8 encoding, the InputStreamReader does not handle the byte
> order mark.
> 
> I also read somewhere that this problem of not able to handle BOM  has
> been a long standing bug with JDK implementation.
> 
> Now, just want to know you guys idea if Velocity should be hacked to
> use a custom-made InputStreamReader that could open the file, detect
> the encoding, and discard the byte order mark, if applicable.

Currently, there's a ResourceLoader which handles this issue up on bugzilla.
    http://issues.apache.org/bugzilla/show_bug.cgi?id=21582

Best regards,
-- Shinobu

--
Shinobu Kawai <shinobu.kawai@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message