velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <shinobu.ka...@gmail.com>
Subject Re: Writing to File
Date Wed, 06 Apr 2005 16:47:06 GMT
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 <shinobu.kawai@gmail.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