8187910: Charset MS950_HKSCS not supported in JDK 9
Reviewed-by: alanb
This commit is contained in:
parent
73d033cf9f
commit
7501a2168a
@ -492,7 +492,7 @@ charset x-MS950-HKSCS-XP MS950_HKSCS_XP
|
||||
|
||||
charset x-MS950-HKSCS MS950_HKSCS
|
||||
package sun.nio.cs.ext
|
||||
type source
|
||||
type template
|
||||
hisname MS950_HKSCS
|
||||
ascii true
|
||||
alias MS950_HKSCS # JDK historical;
|
||||
|
@ -13,4 +13,5 @@ SJIS # SJIS must go together with MS932 to support sun.nio.cs.map
|
||||
MS936
|
||||
MS949
|
||||
MS950
|
||||
MS950_HKSCS
|
||||
MS950_HKSCS_XP
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -54,6 +54,7 @@ public class Main {
|
||||
new File(args[SRC_DIR], args[CHARSETS]));
|
||||
String[] osStdcs = getOSStdCSList(new File(args[SRC_DIR], args[OS]));
|
||||
boolean hasBig5_HKSCS = false;
|
||||
boolean hasMS950_HKSCS = false;
|
||||
boolean hasMS950_HKSCS_XP = false;
|
||||
boolean hasEUC_TW = false;
|
||||
for (String name : osStdcs) {
|
||||
@ -63,6 +64,8 @@ public class Main {
|
||||
}
|
||||
if (name.equals("Big5_HKSCS")) {
|
||||
hasBig5_HKSCS = true;
|
||||
} else if (name.equals("MS950_HKSCS")) {
|
||||
hasMS950_HKSCS = true;
|
||||
} else if (name.equals("MS950_HKSCS_XP")) {
|
||||
hasMS950_HKSCS_XP = true;
|
||||
} else if (name.equals("EUC_TW")) {
|
||||
@ -98,12 +101,15 @@ public class Main {
|
||||
args[TEMPLATE],
|
||||
args[OS].endsWith("windows") ? "windows" : "unix");
|
||||
|
||||
// HKSCSMapping2008/XP.java goes together with Big5/MS950XP_HKSCS
|
||||
if (isStandard && hasBig5_HKSCS || isExtended && !hasBig5_HKSCS) {
|
||||
// HKSCSMapping(2008).java goes std if one of Big5_HKSCS MS950_HKSCS
|
||||
// is in std
|
||||
if (isStandard && (hasBig5_HKSCS || hasMS950_HKSCS) ||
|
||||
isExtended && !(hasBig5_HKSCS || hasMS950_HKSCS)) {
|
||||
HKSCS.genClass2008(args[SRC_DIR], args[DST_DIR],
|
||||
isStandard ? "sun.nio.cs" : "sun.nio.cs.ext",
|
||||
new File(args[COPYRIGHT_SRC], "HKSCS.java"));
|
||||
}
|
||||
// HKSCS_XPMapping.java goes together with MS950XP_HKSCS
|
||||
if (isStandard && hasMS950_HKSCS_XP || isExtended && !hasMS950_HKSCS_XP) {
|
||||
HKSCS.genClassXP(args[SRC_DIR], args[DST_DIR],
|
||||
isStandard ? "sun.nio.cs" : "sun.nio.cs.ext",
|
||||
|
@ -31,6 +31,7 @@ import java.nio.charset.CharsetEncoder;
|
||||
import sun.nio.cs.DoubleByte;
|
||||
import sun.nio.cs.HKSCS;
|
||||
import sun.nio.cs.HistoricallyNamedCharset;
|
||||
import sun.nio.cs.*;
|
||||
import static sun.nio.cs.CharsetMapping.*;
|
||||
|
||||
public class Big5_HKSCS extends Charset implements HistoricallyNamedCharset
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.nio.cs.ext;
|
||||
package $PACKAGE$;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.CharsetDecoder;
|
||||
@ -35,7 +35,7 @@ import static sun.nio.cs.CharsetMapping.*;
|
||||
public class MS950_HKSCS extends Charset implements HistoricallyNamedCharset
|
||||
{
|
||||
public MS950_HKSCS() {
|
||||
super("x-MS950-HKSCS", ExtendedCharsets.aliasesFor("x-MS950-HKSCS"));
|
||||
super("x-MS950-HKSCS", $ALIASES$);
|
||||
}
|
||||
|
||||
public String historicalName() {
|
Loading…
x
Reference in New Issue
Block a user