I have a string and in this string I have some special chars not all of them. I tried to convert this string to utf8, ISO_8859_1 but it didn't work. These special chars are Turkish.
Example of data:
<span class="text-nowrap">DOMATES ÇORBA </span> <span class="text-theme-color-2">|</span>
<span class="text-nowrap">BALKAN USULÜ KÖFTE </span> <span class="text-theme-color-2">|</span>
<span class="text-nowrap">PEYNİRLİ MAKARNA </span> <span class="text-theme-color-2">|</span>
<span class="text-nowrap">BAKLAVA </span> <span class="text-theme-color-2">|</span>
Some of chars equals to:
Ç
= Ç
Ü
= Ü
I tried these but didn't work:
data = new String(text.getBytes(StandardCharsets.ISO_8859_1));
data = StandardCharsets.UTF_8.decode(str_to_bb(text, StandardCharsets.UTF_8)).toString();
[SOLVED]
Thanks. I solved it like this:
data = StringEscapeUtils.unescapeHtml4(text);