JDK-8068169 : Printing national characters, e g, ��, �� and ��, produces garbage on PS printers.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 8u20,8u25,9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86_64
  • Submitted: 2014-11-22
  • Updated: 2014-12-23
  • Resolved: 2014-12-23
Related Reports
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Linux 3.11.10-21-desktop #1 SMP PREEMPT Mon Jul 21 15:28:46 UTC 2014 (9a9565d) x86_64 x86_64 x86_64 GNU/Linux

A DESCRIPTION OF THE PROBLEM :
When printing a Printable to a PrinterJob attached to a postscript printer, any national characters such as ��, �� or ��, painted by the printable on the supplied Graphics come out as as garbage. Some encoding bug probably. 

If I chose to print to a file, a PS-file is produces. If I open it in e g Ocular the natinal characters are all wrong.

REGRESSION.  Last worked in version 7u51

ADDITIONAL REGRESSION INFORMATION: 
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a printable that draws "������������" on the graphics supplied by print.

Create a job and print:
	PrinterJob job = PrinterJob.getPrinterJob();
	job.setPrintable(printable);
	job.print();


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
������������
ACTUAL -
Garbage

REPRODUCIBILITY :
This bug can be reproduced always.


Comments
Attached the test case saved in UTF-8 encoding and the class compiled from it.
23-12-2014