Lalibela
asked on
Veclocity template for rtf and utf-8
Hello,
I have a velocity template which is saved as rtf. I need to populate the data from a database. Things are good as long as it is ascii but when I use unicode charcters all I get is garbage. Can some one give me a clue? I have changed my encoding to "utf-8" im my template servelet. And Is there a way that I can embed a macro in ms word that change a text to utf-8? just like the encoded text dialog in ms word?
Thanks,
Lalibela
:14:15
I have a velocity template which is saved as rtf. I need to populate the data from a database. Things are good as long as it is ascii but when I use unicode charcters all I get is garbage. Can some one give me a clue? I have changed my encoding to "utf-8" im my template servelet. And Is there a way that I can embed a macro in ms word that change a text to utf-8? just like the encoded text dialog in ms word?
Thanks,
Lalibela
:14:15
ASKER
Hello
Thanks for your prompt response. I successfully connect to my DB and fetch the characters correctly as unicode I think there is no problem with it. But is there a possiblity like webpages to specify header info. for word?
Thanks
Thanks for your prompt response. I successfully connect to my DB and fetch the characters correctly as unicode I think there is no problem with it. But is there a possiblity like webpages to specify header info. for word?
Thanks
>>But is there a possiblity like webpages to specify header info. for word?
no idea, you'll have to ask this question in the word forum
no idea, you'll have to ask this question in the word forum
ASKER
Hello,
I found a solution. Just append the incoming unicode string with \'3f . That is all. And I need a refund of my points.
Laliblea,
:14:15
I found a solution. Just append the incoming unicode string with \'3f . That is all. And I need a refund of my points.
Laliblea,
:14:15
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
When you return unicode from the database or when you use unicode in the template? What does it currently output, any errors? Can you post some code, e.g. your template servlet.
When you connect to the database, are you specifying the encoding there as well, e.g. UTF-8?
Sorry to ask so many questions but you need to provide some more specific information.
>> And Is there a way that I can embed a macro in ms word that change a text to utf-8?
no idea, why not try asking this question in the word forum, https://www.experts-exchange.com/Applications/MS_Office/Word/