velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: template encodings
Date Sun, 15 Jul 2001 22:55:01 GMT
Jonathan Revusky wrote:
> 
> "Geir Magnusson Jr." wrote:
> >
> > Jonathan Revusky wrote:
> > >
> > > "Geir Magnusson Jr." wrote:
> > > > >
> > > > > Actually, I missed that the mergeTemplate took the *name* of the
> > > > > template as well. I also just was wondering what the extent to which
> > > > > this had been investigated and tested was.
> > > >
> > > > Extend to which *what* has been investigated and tested???  Is there a
> > > > bug?
> > >
> > > The "what" is using Velocity in locales with other character encodings.
> > > I am not reporting a bug. I was asking question or two, but now I
> > > understand pretty much completely where things are at, I think.
> > >
> >
> > Just to be clear, for anyone looking at this thread, or finding it in
> > the archives -
> >
> > Velocity works well in locales with non- ISO-8859-1 (latin) character
> > encodings.  Of the top of my head, I know that people have used it with
> > encodings appropriate for Russian, Japanese, Chinese, French, Spanish
> > and Finnish users.
> 
> You should have stopped at Chinese. :-) French, Spanish, and Finnish use
> the default ISO-8859-1 (latin) character encoding anyway, so there's no
> issue.

The spanish was in UTF-8.
 
> The other ones you mention are interesting to know about though.
> 
> I did not mean to suggest that it didn't work. I have every reason to
> believe that it does, since the java I/O libraries are what are
> providing the support. It's just a question of knowing where the hooks
> are.

er, yeah...

public Template getTemplate( String template, String encoding)

 
> Also, I understand that the input encoding, theoretically, is not
> necessarily the same as the output encoding. You could, for example,
> store all of the templates in UTF-8 and then output them via the
> localized encodings. I was simply expressing doubt that this is very
> common in practice. In my own framework, I am currently assuming that
> the input and output encodings are the same, since this allows me to
> keep my API simpler and hide messy stuff from the end user, which is the
> goal. If this turns out to be an issue, I'll revisit it.

Ok.  Whatever floats your boat.

geir

 
> Jonathan Revusky
> --
> available for Java/Delphi/Internet consulting
> If you want to...
> - make your .class files double-clickable with SmartJ
> - do Delphi/Java mixed programming with easy-to-use JNI wrapper classes
> - build robust web applications with the Niggle Application Framework
> then...
> check out the Revusky Hacks Page: http://www.revusky.com/hacks/

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!

Mime
View raw message