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

Backport-of: 6ea996c20591cafa9673d9c697437ce2c48e4616
  • Loading branch information
Ichiroh Takiguchi committed May 30, 2022
1 parent 22fc6ce commit 6faebb1
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, 2014, 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 @@ -964,7 +964,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 {
Class<?> fcc = AccessController.doPrivileged(new PrivilegedAction<Class<?>>() {
Expand Down

1 comment on commit 6faebb1

@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.