Java Unicode Chars


I have a problem with using unicode chars in java in processing. I am trying to display random Katakana chars, which this format:

this.value=Character.toString(char(0x30A0 +round(random(0,96))));

problem is that processing does not identify the char and always prints “?”

Furthermore, using the built-in “text” function, results in similar ways as it outputs on the canvas the character for unrecognised char, instead of the one that I want.

Can somebody help please?

this is not working. Processing Desktop App does not recognise the Katakana chars for some reason

It’s showing katakana :japanese_castle: characters for me here: :thinking:

 * Unicode Katakana Test (v1.0.1)
 * GoToLoop (2021/Dec/26)

static final int FONT_SIZE = 22, CHARS = 30;
static final int START = 0x30A0, RANGE = 96;

static final String FONT_JAVA = "Serif";

void setup() {
  size(700, 150);

  textAlign(CENTER, CENTER);
  textFont(createFont(FONT_JAVA, FONT_SIZE, true));

void draw() {
  String txt = "";
  for (int i = 0; i++ < CHARS; txt += (char) (START + (int) random(RANGE)));

  text(txt, width >> 1, height >> 1);

void mousePressed() {

void keyPressed() {

P.S.: Console log depends if the PDE’s selected font can display that UNICODE range though. :grimacing: