Thanks for the reply Tilman.

Yes, you are right, I am indeed getting 8, and not 4.

However, I've been trying to change the encoding for almost two hours now,
with no effect.
Would you happen to know any resources that can help me get this to work?

For more reference, I'm using IntelliJ and all files in my project display
"UTF-8".
I'm using the Javac compiler using version 17 without command line
parameters.
However, I've tried setting things like: encoding=UTF-8, etc. with no
success.

If this solved my issue, that would be amazing, but unfortunately I can't
get it to work.

On 2024/01/30 16:01:56 Tilman Hausherr wrote:
> Also try changing the line
>
>     cs.showText("äöüß");
>
> to
>
>     String s = "äöüß";
>     System.out.println(s.length());
>     cs.showText(s);
>
> the output on the console should be 4. If suspect your output will be 8
> if my theory is correct.
>
> Tilman
>
>

Reply via email to