?
Solved

Veclocity template for rtf  and utf-8

Posted on 2005-04-14
6
Medium Priority
?
488 Views
Last Modified: 2010-04-01
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
0
Comment
Question by:Lalibela
  • 2
  • 2
5 Comments
 
LVL 29

Expert Comment

by:bloodredsun
ID: 13780241
>>Things are good as long as it is ascii but when I use unicode charcters all I get is garbage
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, http://www.experts-exchange.com/Applications/MS_Office/Word/
0
 

Author Comment

by:Lalibela
ID: 13782377
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
0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 13782951
>>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
0
 

Author Comment

by:Lalibela
ID: 13858472
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
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 14631375
PAQed with points refunded (250)

modulo
Community Support Moderator
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Currently, there is an issue with being able to copy values from an external application to a dropdown list in Project Web Access (PWA).  The standard copy and paste methods don't seem to work properly. Here is a way to accomplish this task to s…
In the below post we have mentioned the best hosting type for startups. Also, check out some of the superlative web hosting companies that are proposing affordable web hosting solutions to host your startup website.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question