Hi everybody, 

 

I am working on a Project that uses NVelocity (or Velocity, for that matter) 
and I have an issue with encoding and code pages.

 

The project reads data from an XML file that contains both Latin and Arabic 
characters and (N)Velocity uses this as input to produce HTML pages.

 

The Arabic characters in the input XML file are used to name labels in the HTML 
pages. I’ve been tracing the code and the template engine gets in the context 
the Arabic characters alright (if I use an inspection I get to see the actual 
Arabic text). Then “merge” is executed and an HTML page is produced as output.

When I edit the HTML page, wherever an Arabic string should show up, I get to 
see a string of question marks (e.g. ????????).  

 

But, if I use Arabic strings in comments, for instance, the code of the HTML 
page has the comments in Arabic and not the question marks. Maybe is because 
Velocity doesn’t treat this strings. 

 

An exemple. If I put in my HTML page:

 

<tag> ${lAttribute.Alias}</tag> 

 

I get

 

<tag>???????</tag>

 

But If I put in my HTML page:

 

<tag> الأسم</tag>

 

 

I get:

 

<tag> الأسم</tag>

 

Can you help me, please? Have you any idea about why the merge process doesn’t 
write the text as is supposed? 

 

Thanks very much in advance. 

 

 

 

 

 

Reply via email to