I also tried:
BaseFont bFont = BaseFont.createFont(BaseFont.TIMES_ROMAN, BaseFont.WINANSI,
BaseFont.NOT_EMBEDDED);

and
RtfFont rFont = new RtfFont("Arial", 12.0f);

And it did not work too.

The characters wrote are:
abreviações situação também música 
And it should be:
abreviações situações também música

Thanks,


Rafael Nunes wrote:
> 
> Hello,
> I'm with a little problem about charset in RTF files.
> I cannot insert text in portuguese in a rtf file. Some characters are
> not recognized.
> 
> I tried two ways. Just insert the word, and insert with a specific
> font. Both of them don't work.
> 
> My code:
> 
> Document document = new Document();
> RtfWriter2.getInstance(document, output);
> document.open();
> 
> // 1
> Chunk chunk = new Chunk(text);
> 
> //2
> BaseFont bFont = BaseFont.createFont(BaseFont.TIMES_ROMAN,
> BaseFont.CP1252, BaseFont.EMBEDDED);
> Chunk chunk = new Chunk(text,  new Font(bFont));
> 
> That´s funny because if I print this same text in a .txt file it is
> recognized.
> 
> Ps: RTF File content:
> 
> plural e outras abreviações e acentuação sei também que será a
> música em diversas situações que salvará o homem da sua
> destruição ....
> 
> Thank you in advance,
> --Rafael Nunes
> 
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> 
> 

-- 
View this message in context: 
http://www.nabble.com/RTF-%2B-Portuguese-%2B-Character-Encoding-%28Latin-1--ISO-8859-1%29-tp22350643p22352206.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to