So I'm working with last.fm API. Sometimes, the query results in tracks that contain characters like these:
Æther
, é
, Hṛṣṭa
or non-English characters like these:
水鏡
.
When debugging in Eclipse, I see them just fine (as-is) but printing on console prints these as ???
- which is OK for me.
Now, how do I handle these? At first I though I could remove every song that has any character other than the ones in English language. I used the regex ^\\w+$
but it didn't work. I also tried \\w+
. That didn't work either.
Then I thought further on how do handle these properly. Any one can help me out? I am perfectly fine with letting these tracks out of the equation, ie. I'm fine with having only English character tracks.
Another question: What is the best way to display these character of console and/or Swing GUI?