You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by bu...@apache.org on 2003/07/14 21:35:37 UTC

DO NOT REPLY [Bug 21582] New: - UnicodeFileResourceLoader for Win2k Notepad UTF-8 files

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21582>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21582

UnicodeFileResourceLoader for Win2k Notepad UTF-8 files

           Summary: UnicodeFileResourceLoader for Win2k Notepad UTF-8 files
           Product: Velocity
           Version: 1.3.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Source
        AssignedTo: velocity-dev@jakarta.apache.org
        ReportedBy: mailmur@yahoo.com


[copypaste from velocity-user mailing list]
Date: Mon, 14 Jul 2003 01:52:11 -0700 (PDT)
From: mailmur <ma...@yahoo.com>
Subject: UnicodeFileResourceLoader to support Win2k Notepad UTF-8 files
Content-Type: text/plain; charset=us-ascii

I discovered, that files saved with Win2k Notepad UTF-8 format always generated 
an extra ? character at the start of ISO-8859-1 output text. 

This was due to lack of UTF8 BOM mark support in 
InputStreamReader/OutputStreamWriter classes.

I then created a inputstream implementation to skip BOM mark to overcome this 
bug.

Please, find here a source + testprogram to see it for yourself. I created 
UnicodeFileResourceLoader to make all this transparent.
http://koti.mbnet.fi/akini/java/unicodereader/

I dont know what is the proper procedure to add this to Velocity core (if you 
find this useful), but here it is. Feel free to change class package. Or is 
this even the right list to announce such addition....

Here is a link to Sun bugparade about the UTF-8 BOM problem: 
http://developer.java.sun.com/developer/bugParade/bugs/4508058.html

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