I have created an sqlite database and imported data from csv as UTF-8. It shows some unknown characters like �
. In my android code i have managed this with regular expressions. Now I have problem with \n
. My regular expression not detecting \n
and it will replace \
and n
will be there.
Pattern pattern = Pattern.compile("[^a-zA-Z0-9$' '-:|,&.\"\"()\n]");
Matcher matcher = pattern.matcher(descriptionfromDb);
String description = matcher.replaceAll("");
I have also tried using android Html.fromHtml
and Spannable
and both are not escaping the �
symbol and \n
not get converted to new line.