Hi I'm using this API http://rtftemplate.sourceforge.net/#New%20API and it is working very well, but when I finished my project I discover an issue, the writer function what I'm using does not support characters like this Ã ã é í...
Anyone already had use this API to write RTF documents? How can I resolve this?
Sounds like it's an encoding problem (I actually moved this to the Open Source forum too quickly).
OK, you need to make sure that your program writes the files out in the encoding expected (UTf-8 or whatever). Your reader (Notepad or whatever) needs to be able to _read_ those characters as well, you might be legitimately writing out the correct characters but your client reader and/or your OS may not support those characters.
1.) Make sure you're using the right method calls to write the encoded string. So check the API to see if you can pass in the correct encoding required.
2.) Make sure RTF supports that encoding (remember its a limited text format compared to say a MS Word doc), I'm pretty sure this should be OK though.
3.) Make sure your OS/Client Reader can read the correct encoding. You can test this by getting your program to write the characters directly to the console and/or IDE console and compare that against what your client reader can see (be aware that your console/IDE console also need to be able to read that encoding).
See here for details on RTF character encoding, it looks like its 8-bit ASCII by default with the ability to display unicode extensions. That should help you choose the encoding you need.
Joined: Apr 03, 2009
Thanks for who have tried to help me. I sent a email to Rtf.Template author, and he answer me with the link to the official forum (no have any reference in the official site), http://sourceforge.net/forum/forum.php?forum_id=513003 I have solved my problem with this function