javauser-interfaceutf-8

Why showing square for \u0085 in java?


I used language file to define my Buttons name.But last year this was working fine.

x.client.k.OpenButton=Open\u0085

But suddenly now \u0085 shown as square.I need some expert explanation what happening ? I used utf-8 formatting and java 8.I used language key, to translate app, English and Swedish.

aa


Solution

  • In Windows-1252, the character with hex value 85 is an ellipsis.

    Unicode is however based on ISO 8859-1, where characters 80-9F are control characters, i.e. basically non-printable characters. Non-printable characters are often display as a square (\u25A1), and invalid characters display as a question mark (\uFFFD).

    Replace \u0085 with \u2026, which is the Unicode code point for ellipsis, so that your button text will show as:

    Open…