velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary M. Catlin" <gcatli...@gmail.com>
Subject Re: Unicode in Velocity
Date Wed, 08 Aug 2007 12:19:32 GMT
Thank you for the reply, but not sure if that will help. My solution 
needs to be at a higher level. I need to "set" a variable with a unicode 
value, and to output this value before and after a block of output:

#set ($v = "\uf00b")

$v
$myBlockOutput
$v

The problem has been assigning the unicode value. The standard 'escape' 
does not seem to be working. We are using Velocity 1.5.

Thank you.


mailmur wrote:
> http://koti.mbnet.fi/akini/java/unicodereader/
> http://koti.mbnet.fi/akini/java/java_utf8_xml/
>
> Velocity 1.5+ has UnicodeFileResourceLoader loader
> implementation. You can save .vm files as UTF-8 (with
> or without BOM) text files. It saves you all the
> troubles.
>
> Only issue then is to make sure you send HttpResponse
> headers accordingly.
> Content-Type: text/html; charset=UTF-8
>
> --- "Gary M. Catlin" <gcatlin78@gmail.com> wrote:
>
>   
>> How do I assign and output a unicode character in
>> velocity? I need to 
>> output the value of "f00b" prior to a block of
>> calculated output.
>>
>> TIA
>>     
>
>
>
>        
> ____________________________________________________________________________________
> Pinpoint customers who are looking for what you sell. 
> http://searchmarketing.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message