You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Majji, Sashibhushan" <SM...@carreker.com> on 2005/04/06 00:50:09 UTC
Writing to File
Hi All,
I am writing some data to file using Templet..
fileName = "C:/cs_db.xml";
BufferedWriter writer = new BufferedWriter(
new FileWriter(fileName));
if ( template != null)
template.merge(context, writer);
is it possible to specify the encoding format (like ebcidic
or utf-8 etc..) Also I need to write data in different encoding formats..
Please help me
Thanks
Sashi
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: Writing to File
Posted by Shinobu Kawai <sh...@gmail.com>.
Hi Sashi,
> I am writing some data to file using Templet..
>
> fileName = "C:/cs_db.xml";
> BufferedWriter writer = new BufferedWriter(
> new FileWriter(fileName));
>
> if ( template != null)
> template.merge(context, writer);
>
> is it possible to specify the encoding format (like ebcidic
> or utf-8 etc..) Also I need to write data in different encoding formats..
For encodings of the template, check out here:
http://jakarta.apache.org/velocity/developer-guide.html#Template%20Encoding%20for%20Internationalization
For encodings of the output file, check out here:
http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStreamWriter.html
For general information on i18n, check out here:
http://java.sun.com/j2se/1.5.0/docs/guide/intl/index.html
Best regards,
-- Shinobu
--
Shinobu Kawai <sh...@gmail.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org