Skip to content
Advertisement

Tag: character-encoding

Replacing URL Character Encodings in Java

I am trying to replace character encodings in URL’s to no avail, I have scouted around the internet but have only found outdated libraries and answers. For example, https://fonts.googleapis.com/css?family=Noto+Serif%3A400%2C400i%2C700%2C700i&ver=5.3.4 would become https://fonts.googleapis.com/css?family=Noto+Serif:400,400i,700,700i&ver=5.3.4 The code shown above works, but there must be a more concise way of doing this, right? That’s the question Answer Actually, you can use java.net.URLDecoder

Character Issues

Back Story I basically retrieve strings from a database. I alter some text or those strings. Then I upload those strings back to the database, replacing the original strings. After looking at the front-end that displays those strings, I noticed the character issues. I no longer have the original strings, but I do have the updated strings. The Issue These

Java: how to undo conversion from UTF-8 to ISO-8859-1 [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question My UTF-8 strings have been converted to ISO-8859-1 strings in the following way:

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 and try

Platform’s default charset on different platforms?

Some legacy code relies on the platform’s default charset for translations. For Windows and Linux installations in the “western world” I know what that means. But thinking about Russian or Asian platforms I am totally unsure what their platform’s default charset is (just UTF-16?). Therefore I would like to know what I would get when executing the following code line:

How to reliably guess the encoding between MacRoman, CP1252, Latin1, UTF-8, and ASCII

At work it seems like no week ever passes without some encoding-related conniption, calamity, or catastrophe. The problem usually derives from programmers who think they can reliably process a “text” file without specifying the encoding. But you can’t. So it’s been decided to henceforth forbid files from ever having names that end in *.txt or *.text. The thinking is that

Advertisement