velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mailmur <>
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 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

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,
// write directly to a servlet response stream
template.merge(context, res.getWriter());

Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message