velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mailmur <mail...@yahoo.com>
Subject UTF-8 encoding (input, output) and extra ? always at the front of response?
Date Tue, 01 Apr 2003 22:26:39 GMT
I have specified UTF-8 input/output enconing in
Velocity.properties. I haved saved TestFile.vm as
UTF-8 with Win2k Notepad.
-> this should tell, that template files are UTF-8 so
read them accordingly. Then output response text as
UTF-8 string.

For some reason, I always get one extra '?' character
at the start of string. Storing the file as ANSI
format from Notepad will dissapear the extra characer.

This is how I use velocity tempates. Probably UTF-8
parameter here is not mandatory if I've specified
"input.encoding = UTF-8" and "output.encoding = UTF-8"
params in Velocity.properties.

So, I always get ? char the start of response text if
file was saved as UTF-8.

---------------------
// Get template instance
Template template = getVE().getTemplate(templateFile,
"UTF-8");
....
// write directly to a servlet response stream
template.merge(context, res.getWriter());


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://platinum.yahoo.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