When strings are read from a source (a file, for example) they are just a
sequence of bytes without any meaning. You give meaning to them by
specifying an encoding that with convert those bytes to a Unicode java
string.
Best Regards,
Paulo Soares
> -----Original Message-----
> From: Trevor Linton [SMTP:trevor@(protected)]
> Sent: Wednesday, October 15, 2003 14:56
> To: iText
> Subject: RE: [iText-questions] Continuing Unicode Problem
>
> Right,
>
> But if i'm writing static text I can use an escape literal, but what
> happens
> when i'm reading java strings in from a source? there's no way to change é
> to \u00e9 automatically is there?
>
> - Trevor
>
> -----Original Message-----
> From: itext-questions-admin@(protected)
> [mailto:itext-questions-admin@(protected)
> Soares
> Sent: Wednesday, October 15, 2003 4:09 AM
> To: 'Trevor Linton'; iText
> Subject: RE: [iText-questions] Continuing Unicode Problem
>
>
> This is a problem with your platform encoding. Try "Phrase: \u00e9" and
> you'll see the character.
>
> Best Regards,
> Paulo Soares
>
> > -----Original Message-----
> > From: Trevor Linton [SMTP:trevor@(protected)]
> > Sent: Wednesday, October 15, 2003 4:58
> > To: iText
> > Subject: [iText-questions] Continuing Unicode Problem
> >
> > Why is extended character é not showing up in my PDF document? This is
> > completely perplexing me, it's not a problem with the conversion of
> > unicode because i'm passing it statically compiled in. Is there a java
> sdk
> > setting i need to compile with?
> >
> > - Trevor
> >
> > public class Test {
> > public static void main(String[] args) {
> > Document document = new Document();
> > try {
> > PdfWriter writer = PdfWriter.getInstance(document, new
> > FileOutputStream("test.pdf"));
> > document.open();
> > document.add(new Phrase("Phrase: é"));
> > document.add(new Chunk("Chunk: é"));
> > document.add(new Paragraph("Paragraph: é"));
> > document.close();
> > }
> > catch(DocumentException de) {
> > System.err.println(de.getMessage());
> > }
> > catch(IOException ioe) {
> > System.err.println(ioe.getMessage());
> > }
> > // step 5: we close the document
> > document.close();
> > }
> > }
> >
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> iText-questions mailing list
> iText-questions@(protected)
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> iText-questions mailing list
> iText-questions@(protected)
> https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions