MLQ
MLQ

Reputation: 13511

Danish letters won't display properly on Android TextView

I'm writing a Danish dictionary app. I can index the source files correctly (I think--I use Lucene and DanishAnalyzer), but I can't properly display the words in TextViews and ListViews. The letters æ, ø, and å are displayed as question marks inside a diamond. How do I fix this?

Upvotes: 2

Views: 1457

Answers (2)

MLQ
MLQ

Reputation: 13511

I set the InputStreamReader encoding to MacRoman instead of UTF-8. I supply this InputStreamReader to GSON's fromJson() method. I still don't understand what's going on though.

Upvotes: 0

Warpzit
Warpzit

Reputation: 28162

The problem is probably your data source and it's encoding. If you get the text from some web source you might have to encode it to UTF-8 and then put it in the TextView.

Upvotes: 1

Related Questions