Skip to content

Tag: unicode

Colored Emojis in Java Swing Labels

I was wondering how to dispaly colored emojis in swing. I have a feeling that the Swing (awt) font engine is unable to do this. I’ve tried using the windows emoji font (Segoe UI Emoji), but sadly it only displays the monochrome variants. Is there any UIManager-Property or Client-Property that I can set …

Remove character ‘u202A’ 8234 from string

I am trying to get character at 0 index in a string: So I use this function after I query contact, but I found strange result. Normal input & output: And this the strange input and result: So I try to debug this account and I found when app try to get character at 0 the return is ‘u202A’ 8234,

Difference between uppercase and titlecase

What’s the difference between uppercase and titlecase. Frankly, I never heard of titlecase before. In java there are seperate methods for both: Character.isTitleCase(char) Character.isUpperCase(char) Some websites define it as follows: TitleCase: Matches characters that combine an uppercase letter with …

Set two flags in Java regex.Pattern

I need a matcher like this: and the problem is that it is not simple ASCII. I know that in this particular case I could use [u00FCu00DC] for the ü, but I need to be a bit more general (building the regex from other matcher groups). So according to javadocs: By default, case-insensitive matching assumes that o…

Is there a Java library like Perl 5’s Text::Unidecode?

Perl 5 has a module on CPAN named Text::Unidecode that transliterates Unicode into ASCII. So, for instance, if you hand it the string ““北亰 — it’s the best”” it hands back the string “”Bei Jing — it’s the best””. A quick search for Java libraries to do the same t…