mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-27 18:50:07 +00:00
8139216: Non-ASCII characters in CUPS printer names are not properly displayed
Reviewed-by: prr, rchamyal
This commit is contained in:
parent
e0f0f10478
commit
a2b313cb84
@ -321,7 +321,11 @@ public class IPPPrintService implements PrintService, SunPrinterJobService {
|
||||
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) {
|
||||
printer = name;
|
||||
}
|
||||
supportedDocFlavors = null;
|
||||
supportedCats = null;
|
||||
mediaSizeNames = null;
|
||||
@ -351,7 +355,11 @@ public class IPPPrintService implements PrintService, SunPrinterJobService {
|
||||
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) {
|
||||
printer = name;
|
||||
}
|
||||
supportedDocFlavors = null;
|
||||
supportedCats = null;
|
||||
mediaSizeNames = null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user