https://kotlinlang.org logo
#compose
Title
# compose
l

Lukas

07/15/2021, 7:39 AM
Hi, I've got a problem with character rendering. I'm loading some text via Retrofit, which contains html-escaped umlauts (charset is ISO-8859-1). Locally I replace these with
Html.fromHtml()
, but instead of showing their corresponding umlauts, I just get these question mark diamonds, as shown in the picture. I assume this is a charset problem, but I couldn't find any information on how to set a specific one in compose.
t

Timo Drick

07/15/2021, 7:50 AM
Don't think this is an compose issue. Maybe you need to decode your input data using the ISO encoding.
l

Lukas

07/15/2021, 8:23 AM
You're right, it's not a compose issue. As it turns out, I'm a bit of an idiot, because it was in fact the unencoded umlauts which caused troubles here, I mixed them up when analyzing the logs. I asked my backend dev to html escape all text, which I'm decoding locally with
Html.fromHtml()
. Thanks Timo.