--- old/src/java.desktop/unix/classes/sun/print/IPPPrintService.java 2015-10-15 16:11:57.505052320 +0530 +++ new/src/java.desktop/unix/classes/sun/print/IPPPrintService.java 2015-10-15 16:11:57.373052325 +0530 @@ -321,7 +321,11 @@ if ((name == null) || (url == null)){ throw new IllegalArgumentException("null uri or printer name"); } - printer = name; + try { + printer = java.net.URLDecoder.decode(name, "UTF-8"); + } catch (java.io.UnsupportedEncodingException e) { + System.out.println("Unsupported Encoding Exception"); + } supportedDocFlavors = null; supportedCats = null; mediaSizeNames = null; @@ -351,7 +355,11 @@ if ((name == null) || (uriStr == null)){ throw new IllegalArgumentException("null uri or printer name"); } - printer = name; + try { + printer = java.net.URLDecoder.decode(name, "UTF-8"); + } catch (java.io.UnsupportedEncodingException e) { + System.out.println("Unsupported Encoding Exception"); + } supportedDocFlavors = null; supportedCats = null; mediaSizeNames = null; @@ -361,6 +369,7 @@ init = false; defaultMediaIndex = -1; try { + myURL = new URL(uriStr.replaceFirst("ipp", "http")); } catch (Exception e) { @@ -391,7 +400,7 @@ if (!init) { // init customMediaSizeNames customMediaSizeNames = new CustomMediaSizeName[0]; - + if ((urlConnection = getIPPConnection(myURL)) == null) { mediaSizeNames = new MediaSizeName[0]; mediaTrays = new MediaTray[0]; @@ -1748,7 +1757,7 @@ writeIPPRequest(os, OP_GET_ATTRIBUTES, attClNoUri) : writeIPPRequest(os, OP_GET_ATTRIBUTES, attCl); if (success) { - InputStream is = null; + InputStream is = null; if ((is = urlConnection.getInputStream())!=null) { HashMap[] responseMap = readIPPResponse(is);