jeremias 2003/01/23 00:37:37 Modified: src/org/apache/fop/render/ps Tag: fop-0_20_2-maintain PSRenderer.java Log: Temporary fix for an encoding mismatch (WinAnsiEncoding vs. ISOLatin1). The hyphen character is the only character corrected. Submitted by: Arnd Beissner <[EMAIL PROTECTED]> Revision Changes Path No revision No revision 1.15.2.13 +11 -5 xml-fop/src/org/apache/fop/render/ps/PSRenderer.java Index: PSRenderer.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/ps/PSRenderer.java,v retrieving revision 1.15.2.12 retrieving revision 1.15.2.13 diff -u -r1.15.2.12 -r1.15.2.13 --- PSRenderer.java 18 Jan 2003 18:19:14 -0000 1.15.2.12 +++ PSRenderer.java 23 Jan 2003 08:37:37 -0000 1.15.2.13 @@ -1,6 +1,6 @@ /* * $Id$ - * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved. + * Copyright (C) 2001-2003 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. */ @@ -74,7 +74,8 @@ add a color to grayscale conversion for bitmaps to make output smaller (See PCLRenderer) - enhanced font support and font embedding -- support different character encodings +- fix character encodings (Helvetica uses WinAnsiEncoding internally but is + encoded as ISOLatin1 in PS) - try to implement image transparency - Add PPD support - fix border painting (see table.fo) @@ -706,10 +707,15 @@ for (int i = 0; i < l; i++) { char ch = s.charAt(i); char mch = fs.mapChar(ch); - if (mch > 127) { + + /**@todo Do this in a clean way */ + // temp fix abe: map ascii '-' to ISO latin 1 hyphen char + if (mch == '-') { + sb = sb.append("\\" + Integer.toOctalString(173)); + } else /* fix ends */ if (mch > 127) { sb = sb.append("\\" + Integer.toOctalString(mch)); } else { - String escape = "\\()[]{}"; + final String escape = "\\()[]{}"; if (escape.indexOf(mch) >= 0) { sb.append("\\"); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]