velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mailmur <>
Subject Re: Encoding problem in velocity
Date Sat, 03 Jul 2010 21:05:35 GMT
This is year 2010 all should use nothing but unicode file encodings and html reply encodings.
Unfortunately Velocity and Java does not use utf-8 as a default setting, and not all velocity
resource loaders support it.

I always recommend using FileResourceLoader and its use of UTF-8withBOM file reader.

Use "unicode=true" setting in a loader configuration, save .vm files as
UTF-8 with BOM marker. Its essential to use a bom marker to distinguish proper encoding within
a file itself.

ps: Here is an old but still valid document of the utf-8 state in Java environment.

----- Original Message ----
From: soumyanilchatterjee <>
Sent: Fri, July 2, 2010 12:20:39 PM
Subject: Encoding problem in velocity

Hi ,
I am using velocity engine to read a template and and generate a document
like the template,but i have a problem that if my data is russian(Cyrllic)
then data is coming as junk.The same code runs fine in windows.I have set
input.encoding=windows-1251,output.encoding=windows-1251 as well as
ISO--8859-5 in file,but it didn't  work in unix
enviornment.Could u please help.any clarification needed kindly revert back.

View this message in context:
Sent from the Velocity - User mailing list archive at


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

View raw message