Hi, Current bookmark in FOP extension dosen't handle its label correctly, if a label contains a character whose unicode value is greater than 256 (such as Japanese hiragana). Following patch will fix this problem. Regards. ======= SASAKI Suguru mailto : [EMAIL PROTECTED] ________________________________________________________________ --- xml-fop/src/org/apache/fop/pdf/PDFOutline.java.orig Thu Aug 2 00:33:25 2001 +++ xml-fop/src/org/apache/fop/pdf/PDFOutline.java Thu Aug 2 01:23:46 2001 @@ -147,28 +147,24 @@ } /** - * escape parens, and other special chars for PDF + * escape string (see 3.8.1 in PDF reference 2nd edition) */ private String escapeString(String s) { StringBuffer result = new StringBuffer(); if (s != null) { int l = s.length(); + // byte order marker (0xfeff) + result.append("\\376\\377"); + for (int i = 0; i < l; i++) { char ch = s.charAt(i); - if (ch > 127) { - result.append("\\"); - result.append(Integer.toOctalString((int)ch)); - } else { - switch (ch) { - case '(': - case ')': - case '\\': - result.append('\\'); - break; - } - result.append(ch); - } + int high = (ch & 0xff00) >>> 8; + int low = ch & 0xff; + result.append("\\"); + result.append(Integer.toOctalString(high)); + result.append("\\"); + result.append(Integer.toOctalString(low)); } } ________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]