Skip to content

Tag: encoding

Properly set UTF-8 encoding to a FileHandler in Java

I initialize my FileHandler as follows: and add it to my Logger like this: If i remove the setEncoding on my FileHandler, its sill is wrong. But strangely, if i add the exact same Encoding to my ConsoleHandler, it stops working too. (But without the explicit set, it works at least in my IntelliJ-Console). Int…

Encoding Problem while saving a txt file in utf-8

The follwing line should write a ü in test.txt encoded in utf-8- At least this is what I expect it to do. But if I open the file in a text editor, the editor shows and the editor states that it would read the file as utf-8. I even tried two editors and both show the same unexpected result. A

Spring Rest Template Injects Value into Parameter with %

Can someone please explain to me what is happening in the following code? If I run: Spring tells me that the URL used is https://example.com/../username/path where username = user%25123 even though I set the username = user%123. This is looking to me to be not a Spring issue, rather a URL encoding issue, but …

JSP can’t display Russian characters

I have a JSP file that contains paragraphs with Russian text. However, no matter what I do I can’t get a browser to display that text – instead all I get is hieroglyphs. The same text but in a simple HTML file without any headers or declarations works fine: But the moment I save that file as JSP a…