We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 741b272 commit 63d9bcaCopy full SHA for 63d9bca
io/src/main/java/com/itextpdf/io/util/TextUtil.java
@@ -46,6 +46,7 @@ This file is part of the iText (R) project.
46
import com.itextpdf.io.font.otf.Glyph;
47
import com.itextpdf.io.font.otf.GlyphLine;
48
49
+import java.nio.charset.Charset;
50
import java.util.ArrayList;
51
import java.util.List;
52
@@ -248,4 +249,12 @@ public static boolean isNonPrintable(int c) {
248
249
public static boolean isWhitespaceOrNonPrintable(int code) {
250
return Character.isWhitespace(code) || isNonPrintable(code);
251
}
252
+
253
+ public static boolean charsetIsSupported(String charsetName) {
254
+ try {
255
+ return Charset.isSupported(charsetName);
256
+ } catch (IllegalArgumentException e) {
257
+ return false;
258
+ }
259
260
0 commit comments