On Friday, October 24, 2003, at 12:10 PM, Charles Morehead wrote:



Howdy,


First of all, my apologies if this functionality is already provided by
velocity. I did search through the docs and mailing list and didn't
find what I was looking for... so, that caveat aside:

I've been working with velocity bit, and one area that seems to be a
little lacking is the ability for templates to specify their own
encoding.

Indeed. It's a chicken and egg, isn't it? If the template is in UTF8, how do we read the template to find that out w/o knowing the character representation of the bytestream?


[SNIP some well-thought-out discussion]

Let me ask a question. What problem are you trying to solve? Is it that you need to *remember* what encoding a template is in? I've thought about that one on and off, and never came to a good conclusion other than writing a loader wrapper that would take a template name like

foo.vm.utf8

and do the right thing.

I've also thought about a scheme like you suggested, where we have an informal documentation-style approach, like

## @encoding <encoding>

and then another wrapper loader that figures it out and calls the resource loader with the correct info.

geir

--
Geir Magnusson Jr                                   203-247-1713(m)
[EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to