From: Jost B. <jos...@ya...> - 2005-01-05 18:40:51
|
> You will see that instead of special chars like "ąść" there is "?". > UTF-8 should work ? Yes, of course. See attached png. But note that your OS must support UTF-8. For example: bash-2.05b$ echo $LANG de_DE.UTF-8 > $baseFont = new Java("com.lowagie.text.pdf.BaseFont"); > public static final boolean EMBEDDED = true; Yes, I see the problem. The spec says that bean properties are examined first. Which means that we have to call the method BaseFont.isEmbedded(), which will return the protected variable embedded. This is a) not what you want and b) does not work because baseFont is a class, not an instance. JSR 223 currently has the same problem. I think it is necessary to check for a real variable first, only if that fails we should call the property method. I check this against the current spec and will decide when I am back from vacation in three weeks. BTW: Of course, the new Java(...BaseFont) code above should throw an exception "class is abstract" instead of silently returning the class instead of the instance. This is one of the problems the bridge has inherited from the original php4 ext/java written by Sam Ruby. This will change with the 2.x versions, when we switch to the JSR code. Jost |