# Umlaute is an Invalid character constant?

**URL:** <https://discourse.processing.org/t/umlaute-is-an-invalid-character-constant/47857>\
**Category:** Coding Questions\
**Created:** [February 7, 2026, 5:47pm UTC](https://discourse.processing.org/t/umlaute-is-an-invalid-character-constant/47857 "2026-02-07T17:47:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![u.strautz](https://avatars.discourse-cdn.com/v4/letter/u/ac91a4/32.png) [@u.strautz](https://discourse.processing.org/u/u.strautz)\
**Post date:** [February 7, 2026, 5:47pm UTC](https://discourse.processing.org/t/umlaute-is-an-invalid-character-constant/47857/1 "2026-02-07T17:47:48Z")

</div>

I am checking if there are some Umlaute in my text. The error message is “Invalid character constant”

````auto
```
if (text.charAt(0) == 'ä') println("Hallo");
```

````

The same happens IMHO with every char above #127. This only happens in Processing. In pure java it works as it should.

Mit herzlichen Grüßen

Uli

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 7, 2026, 6:30pm UTC](https://discourse.processing.org/t/umlaute-is-an-invalid-character-constant/47857/2 "2026-02-07T18:30:50Z")

</div>

Hello @u.strautz,

Welcome!

It works with Processing 4.4.10 on W10:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/2/d/2d8e36f14d1b927473bf786838d360f2b405f1cb.png)

Also works with Processing 4.5.2 on W10.

Can you please provide some details:

- Processing version
- Operating system
- An MCVE for us to try.  
This can help narrow it down.  
Sometimes it is the renderer or something else in the code.

More on MCVE here:  
_[Guidelines—Asking Questions](https://discourse.processing.org/t/guidelines-asking-questions/2147)_

`:)`

---

<div class="post-metadata">

**Author:** ![u.strautz](https://avatars.discourse-cdn.com/v4/letter/u/ac91a4/32.png) [@u.strautz](https://discourse.processing.org/u/u.strautz)\
**Post date:** [February 8, 2026, 10:28am UTC](https://discourse.processing.org/t/umlaute-is-an-invalid-character-constant/47857/3 "2026-02-08T10:28:10Z")

</div>

I use W11 & Processing 4.5.2

The IA said I should check the coding. I did and it is UTF-8 w/o BOM

If the only Tab is…

```auto
void setup() {
size(400, 400);
}

void draw() {
String text = “äbc”;
if (text.charAt(0)== ‘ä’) println(“Hallo”);
}

```

it works just fine.  
The trouble begins, when I have a second tab (StringInt.java). Now the error pops up.

```auto
public class StringInt {

} // end of class StringInt 

```

So it has something to do with regular java classes. I need them to experience private procedures and variables in class. (encapsulation)

Gruß, Uli

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 9, 2026, 9:37pm UTC](https://discourse.processing.org/t/umlaute-is-an-invalid-character-constant/47857/5 "2026-02-09T21:37:09Z")

</div>

Hello,

I only get the error if there is a java extension even if it empty.

Workaround:

```processing
size(200, 100);

char c0 = "ä".charAt(0); // This is your umlaute character
println(c0);

char c1 = "Ω".charAt(0); 
println(c1);

String text = "äbc";
if (text.charAt(0) == c0) println("Hallo");

textSize(24);
fill(0);
text(c0 + " " + c1, 20, 50);

```

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/c/d/cd9a4e1c47e6f56347adda1359470dc5c39296d6.png)

Practical example:

```processing
String text = "ä ö ü Ä Ö Ü ß";
// Either of these work:
//char um = text.charAt(0); //umlaute
char um = "ä".charAt(0); //umlaute  
  
String s0 = "Äpfel, Öl und Käse gehören zu süßen und würzigen Speisen.";
String s1 = "ä ö ü Ä Ö Ü ß sind die deutschen Sonderzeichen.";

void setup()
{
  for(int i=0; i<s0.length(); i++)
   {
   if (s0.charAt(i) == um) 
     println("Index", i, "contains", um);
   } 
}

```

There may be something in here to explain:  
_[processing4/java/src/processing/mode/java/JavaBuild.java at main · processing/processing4 · GitHub](https://github.com/processing/processing4/blob/main/java/src/processing/mode/java/JavaBuild.java?utm_source=chatgpt.com#L345)_

Note:  
I deleted a previous post.  
I was remaining tabs (with and without the java extension) before and did NOT restart the PDE and was under the impression I had a solution. I did not.

Live and learn.

`:)`

---

<div class="post-metadata">

**Author:** ![u.strautz](https://avatars.discourse-cdn.com/v4/letter/u/ac91a4/32.png) [@u.strautz](https://discourse.processing.org/u/u.strautz)\
**Post date:** [February 10, 2026, 6:59am UTC](https://discourse.processing.org/t/umlaute-is-an-invalid-character-constant/47857/6 "2026-02-10T06:59:33Z")

</div>

Thanks for trying, the workaround works but is a bit ugly.

BTW I did never mention: It is only a processing warning so it compiles smoothly. The java compiler is not the problem.

Thanks again, Uli

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 10, 2026, 5:25pm UTC](https://discourse.processing.org/t/umlaute-is-an-invalid-character-constant/47857/7 "2026-02-10T17:25:16Z")

</div>

> [@u.strautz](#):
>
> Thanks for trying, the workaround works but is a bit ugly.

It is not a working solution.  
Having the java extension also appears to suppress other warnings.

This topic and investigation may help shed some light on this at some point.

I did not find a related issue here:

> **[processing/processing4](https://github.com/processing/processing4/issues)**
>
> Source code for Processing, the software sketchbook and Java-based programming language for students, artists, designers, educators, hobbyists, and creative coders. Includes the core library, and e...

Did not do an exhaustive search.

@stefterv Any idea about this?

`:)`

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 11, 2026, 2:14am UTC](https://discourse.processing.org/t/umlaute-is-an-invalid-character-constant/47857/8 "2026-02-11T02:14:40Z")

</div>

> [@u.strautz](#):
>
> Thanks for trying, the workaround works but is a bit ugly.

It is not a working solution.  
Having the java extension also appears to suppress other warnings.

This topic and investigation may help shed some light on this at some point.

I did not find a related issue here:

> **[processing/processing4](https://github.com/processing/processing4/issues)**
>
> Source code for Processing, the software sketchbook and Java-based programming language for students, artists, designers, educators, hobbyists, and creative coders. Includes the core library, and e...

Did not do an exhaustive search.

This worked:

_[Use UTF-8 code pages in Windows apps - Windows apps | Microsoft Learn](https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page)_  
Link has a box that tells how to set this for Windows 10 or 11.

Once I selected this I did not see the “Invalid character constant” errors:

 ![utf-8 encoding](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/d/2/d258e5a1626476475798f97a387ef6744fdc7b63.png)

As always… proceed with caution.  
It worked on my Windows 10 PC.

`:)`
