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. http://svn.apache.org/repos/asf/velocity/engine/trunk/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java Use "unicode=true" setting in a velocity.properties 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. http://koti.mbnet.fi/akini/java/unicodereader/ ----- Original Message ---- From: soumyanilchatterjee <soumyanil.chatter...@3i-infotech.com> To: user@velocity.apache.org 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 velocity.properties file,but it didn't work in unix enviornment.Could u please help.any clarification needed kindly revert back. -- View this message in context: http://old.nabble.com/Encoding-problem-in-velocity-tp29053984p29053984.html Sent from the Velocity - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org