Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8139216

Non-ASCII characters in CUPS printer names are not properly displayed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u60
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Resolved In Build:
      b94
    • CPU:
      x86_64
    • OS:
      linux

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_60"
      Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
      Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Debian 8 "Jessie"

      Linux bathurst 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Printers with non-ASCII characters are configured on the system.

      Output of command "lpstat -p" (the first three lines are the relevant ones):

      printer äöü is idle. enabled since Fri 28 Aug 2015 11:04:23 CEST
      printer äbc is idle. enabled since Fri 28 Aug 2015 11:40:08 CEST
      printer a…b is idle. enabled since Tue 08 Sep 2015 11:10:58 CEST
      printer a&&b is idle. enabled since Tue 08 Sep 2015 11:10:20 CEST
      printer abc is idle. enabled since Fri 28 Aug 2015 11:40:03 CEST
      printer PDF is idle. enabled since Thu 03 Sep 2015 14:33:26 CEST
      printer remote-pdf is idle. enabled since Thu 11 Jun 2015 15:58:32 CEST
      printer remote-vmweg3 is idle. enabled since Wed 22 Jul 2015 13:31:40 CEST
      printer test-deleteme is idle. enabled since Thu 03 Sep 2015 14:46:08 CEST
      printer to-pdf-file is idle. enabled since Tue 30 Jun 2015 09:14:57 CEST
      printer tofile is idle. enabled since Fri 26 Jun 2015 17:14:36 CEST
      printer tofile-boomaga is idle. enabled since Wed 01 Jul 2015 09:39:21 CEST
      printer tofile-cups-pdf is idle. enabled since Tue 30 Jun 2015 11:49:16 CEST
      printer tofile-plotter is idle. enabled since Thu 16 Jul 2015 11:05:02 CEST
      printer tofile-printer is idle. enabled since Fri 26 Jun 2015 17:05:13 CEST
      printer trac14394 is idle. enabled since Mon 24 Aug 2015 10:22:47 CEST
      printer trac14394modified is idle. enabled since Wed 26 Aug 2015 09:38:24 CEST
      printer trac14394modified2 is idle. enabled since Wed 26 Aug 2015 13:26:29 CEST
      printer trac14394ok disabled since Wed 26 Aug 2015 15:39:07 CEST -
      The printer configuration is incorrect or the printer no longer exists.

      A DESCRIPTION OF THE PROBLEM :
      In the dropdown menu of the printers, special characters in the printer names are not displayed properly, but their "UTF-8 codepoint values" are shown. For example, the printer "äbc" (with the German umlaut "ä" as the first character) is displayed as "%C3%A4bc".

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      * install CUPS if necessary
      * set up a new printer queue whose name contains non-ASCII characters with the following command (with root privileges):
        "lpadmin -p "äbc" -v http://example.org/printer3 -E"
      * compile the class "PrintDialogTest" whose source code is given below:
        javac PrintDialogTest.java
      * run the program:
        java PrintDialogTest
      * click the arrow of the printer dropdown menu and look at the printer names

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The printer name should be displayed as "äbc".
      ACTUAL -
      The printer name is displayed as "%C3%A4bc".

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.print.PrinterJob;

      public class PrintDialogTest {

          public static void main(final String... args) {
              PrinterJob pj = PrinterJob.getPrinterJob();
              pj.printDialog();
          }
      }

      ---------- END SOURCE ----------

        Attachments

          Activity

            People

            Assignee:
            psadhukhan Prasanta Sadhukhan
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: