Java Character isIdeographic() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
Java 7+

Definition

In Java, Character.isIdeographic(codePoint) returns true when the code point has the Unicode Ideographic property. These are the CJK ideographs used in Chinese, as kanji in Japanese, and as hanja in Korean, such as U+4E2D ("middle") and U+6587 ("writing").

Many characters in East Asian text are not ideographs. Japanese Hiragana and Katakana and Korean Hangul syllables are letters, so isLetter() returns true for them, but isIdeographic returns false.

A static method of java.lang.Character (Java 7+): call it on the class, as in Character.isIdeographic(...); you do not need a Character object. No import is needed, because java.lang is always available.

Unicode version.

The answer comes from the Unicode Character Database built into your JDK, and each Java release follows a specific Unicode version (Java 8, for example, uses Unicode 6.2). The characters used on this page have had the same properties for many Unicode versions, so the examples print the same result on any current JDK.

Syntax

Only an int overload exists; pass a code point (a char is widened).

Java
Character.isIdeographic(0x4E2D);   // true  (CJK "middle")
Character.isIdeographic('A');      // false
Character.isIdeographic(0x3042);   // false (Hiragana A is a letter, not an ideograph)
Character.isIdeographic(0x20000);  // true  (CJK Extension B, two chars in a String)
CallWhat it does
Character.isIdeographic(cp)Test one code point.
Character.isIdeographic(s.codePointAt(i))Test the character at index i, including characters above U+FFFF.
Character.isIdeographic(s.charAt(i))Works for the common ideographs below U+FFFF only.

Added in Java 7 with only an int parameter. Many ideographs live above U+FFFF (the CJK extension blocks), so read characters with codePointAt rather than charAt.

Library declarations
Java
// java.lang.Character (since Java 7)
public static boolean isIdeographic(int codePoint)

Parameters

ParameterDescription
codePoint (int)The Unicode code point to test.

Return Value

Return ValueDescription
trueThe code point is an ideograph, as defined by the Unicode Ideographic property.
falseAnything else, including Hiragana, Katakana, Hangul, Latin letters, and surrogate halves.

Compare with Similar Methods

Other ways to recognise East Asian text:

MethodHow it differs
isLetter(cp)True for ideographs and for Hiragana, Katakana, and Hangul.
isAlphabetic(cp)A wide letter test (Java 7+), also true for ideographs.
Character.UnicodeScript.of(cp)Tells the script, such as HAN, HIRAGANA, or HANGUL (Java 7+).
getType(cp)Ideographs report OTHER_LETTER (5), like many other letters.

Java Examples

Example 1 — Ideographs vs Other East Asian Letters

Compare isLetter and isIdeographic on Latin, Chinese, Hiragana, Katakana, and Hangul characters.

Java
public class CharacterIsIdeographicClassify {
    public static void main(String[] args) {
        int[] cps = {'A', 0x4E2D, 0x6587, 0x3042, 0x30A2, 0xAC00};
        for (int cp : cps) {
            System.out.println(cp + " letter=" + Character.isLetter(cp)
                    + " ideographic=" + Character.isIdeographic(cp));
        }
    }
}

How It Works

  1. All six are letters. Latin A, the two Han characters, Hiragana A (12354), Katakana A (12450), and the Hangul syllable GA (44032) all pass isLetter.
  2. Only Han is ideographic. U+4E2D and U+6587 have the Ideographic property; the kana and Hangul are phonetic scripts, so they print false.
  3. Decimal codes. The array uses hex literals such as 0x4E2D, while println prints the same values in decimal, such as 20013.

Example 2 — Count the Kanji in a Japanese Phrase

The phrase "nihongo desu" mixes three kanji with two Hiragana characters.

Java
public class CharacterIsIdeographicCount {
    public static void main(String[] args) {
        String phrase = "\u65E5\u672C\u8A9E\u3067\u3059";
        int letters = 0;
        int ideographs = 0;
        for (int i = 0; i < phrase.length(); i++) {
            int cp = phrase.codePointAt(i);
            if (Character.isLetter(cp)) letters++;
            if (Character.isIdeographic(cp)) ideographs++;
        }
        System.out.println("letters=" + letters + " ideographs=" + ideographs);
    }
}

How It Works

  1. Five BMP characters. The kanji U+65E5, U+672C, and U+8A9E are followed by the Hiragana U+3067 and U+3059; each fits in one char, so stepping i by 1 is safe here.
  2. Two independent counters. Each code point is checked by both tests, so one character can add to both totals.
  3. The kana count as letters only. All five are letters, but only the three kanji are ideographs.

Example 3 — An Ideograph Stored as a Surrogate Pair

U+20000 is the first character of CJK Unified Ideographs Extension B. Test its first char and then its real code point.

Java
public class CharacterIsIdeographicExtB {
    public static void main(String[] args) {
        String rare = "\uD840\uDC00";
        int cp = rare.codePointAt(0);
        System.out.println("length=" + rare.length() + " codePoint=0x" + Integer.toHexString(cp));
        System.out.println("first char only: " + Character.isIdeographic(rare.charAt(0)));
        System.out.println("whole code point: " + Character.isIdeographic(cp));
    }
}

How It Works

  1. Built from a surrogate pair. \uD840 followed by \uDC00 is how UTF-16 stores U+20000, so the String has length 2.
  2. The char is widened, not combined. charAt(0) gives 0xD840, which becomes the int 55360, a surrogate code point with no Ideographic property.
  3. The real character. codePointAt(0) returns 0x20000, and isIdeographic recognises it as a Han ideograph.

Frequently Asked Questions

Java 7. It takes an int code point; there is no char overload, but a char argument is widened automatically.
No. They are phonetic letters, so isLetter returns true and isIdeographic returns false.
No. Hangul is an alphabet. Korean hanja, which are Han characters, are ideographic.
Loop over code points and test isIdeographic, or check Character.UnicodeScript.of(cp) == Character.UnicodeScript.HAN for a script-based test. Both need Java 7 or newer.
Tens of thousands of ideographs are above U+FFFF and stored as two chars. charAt would hand the method one surrogate half, which always returns false.

Next: isISOControl()

Check for ISO control characters: codes 0x00 to 0x1F and 0x7F to 0x9F.

isISOControl() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

12 people found this page helpful