You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Guillaume Math� <gm...@smartinnov.com> on 2001/08/20 17:50:29 UTC

Accentuated characters in references

Hi,
I'm currently working on a project involving servlets and velocity. To describe it shortly, it's a web-based, online business management system.
The choice of Velocity was obvious since we already choosed to develop the whole thing with Java and Tomcat.
Well for now i wont get any further on this, now to my current problem.

Our program is i18n-friendly, for this i'm using standard Java Locale API. Since we're French all our text references are in French as well.
The problem comes with accentuated characters like "é" (i dont know if it displays correctly on your mailer, it's an acute E). Java Locale 
handles them okay, but velocity considers they're not part of reference names.
Thus if I have a reference called $Affiché , Velocity thinks i want $Affich . No good...
Do i have to run through my i18n database or is there a fix in the pipe ? (no worries if it's not, it'll take me a short time to get rid of those 
accents)

Regards
Guillaume Mathé


Re: Accentuated characters in references

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Guillaume Mathé wrote:
> 
> Hi,
> I'm currently working on a project involving servlets and velocity. To describe it shortly, it's a web-based, online business management system.
> The choice of Velocity was obvious since we already choosed to develop the whole thing with Java and Tomcat.
> Well for now i wont get any further on this, now to my current problem.
> 
> Our program is i18n-friendly, for this i'm using standard Java Locale API. Since we're French all our text references are in French as well.
> The problem comes with accentuated characters like "é" (i dont know if it displays correctly on your mailer, it's an acute E). Java Locale
> handles them okay, but velocity considers they're not part of reference names.
> Thus if I have a reference called $Affiché , Velocity thinks i want $Affich . No good...
> Do i have to run through my i18n database or is there a fix in the pipe ? (no worries if it's not, it'll take me a short time to get rid of those
> accents)
>

That's a good one.  Never thought of that :)

How do you stuff things into the context?

(My gut says get rid of the accents for now, but give us an example to
work from for a fix.)

geir


-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
Well done is better than well said - New England Proverb