velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Revusky <>
Subject Re: template encodings
Date Sun, 15 Jul 2001 20:35:36 GMT
"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

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

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.

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
check out the Revusky Hacks Page:

View raw message