Use special characters in strings.xml to load into WebView

I am using WebView to display a String resource. Here is the code -

 <string name="abc">Γ </string> <string name="abcd">Γ¨</string> 

When I load this into my WebView , it displays some garbage values. How to display these special characters in WebView ??

+4
source share
3 answers

Check this list of special characters and how to code in html.

 <string name="abc">&#224;</string> <string name="abc">&#232;</string> 
+4
source

If you enter these values ​​into your XML values ​​using a graphical interface, the IDE will automatically format them for you.

0
source

Put the character code in the string tag:

 <string name="welcome">Welcome &#33;</string> 

The result will look like this: Welcome!

For more character code use the link below:

http://www.degraeve.com/reference/specialcharacters.php

Enjoy ...

0
source

Source: https://habr.com/ru/post/1497998/


All Articles