Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8282422: JTable.print() failed with UnsupportedCharsetException on AI…
…X ko_KR locale

Reviewed-by: prr, serb
  • Loading branch information
Ichiroh Takiguchi committed Mar 23, 2022
1 parent 8cc1235 commit 6ea996c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/java.desktop/share/classes/sun/awt/FontConfiguration.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2022, 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
Expand Down Expand Up @@ -960,7 +960,9 @@ private CharsetEncoder getFontCharsetEncoder(final String charsetName,
return fc.newEncoder();
}

if (!charsetName.startsWith("sun.awt.") && !charsetName.equals("default")) {
if (!charsetName.startsWith("sun.awt.") &&
!charsetName.equals("default") &&
!charsetName.startsWith("sun.font.")) {
fc = Charset.forName(charsetName);
} else {
@SuppressWarnings("removal")
Expand Down

1 comment on commit 6ea996c

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.