Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to encode a Euro symbol into strings.xml in android XML files

Tags:

java

android

xml

I thought, that this is gonna be pretty easy to find out. However, google is giving me just bad results. Please, does anyone know how can I write a Euro symbol into a strings.xml value? I still get an exception that such value is not allowed. Thanks.

like image 917
Filip Majernik Avatar asked May 04 '12 13:05

Filip Majernik


People also ask

How do I get the euro symbol on my Android?

The standard keyboard that comes with most versions of Android includes the euro symbol (€), but that character is not immediately visible. When you are tapping out an email message or other text and need to insert the euro sign, tap the ? 123 key in the lower-left corner of the keyboard.

What is string xml file in Android?

String. xml file contains all the strings which will be used frequently in Android project. String. xml file present in the values folder which is sub folder of res folder in project structure.In Android Studio, we have many Views such as TextView,Button,EditText,CheckBox,RadioButton etc.

Can I use a dash in xml?

Just replace - with – because when you type a dash on the keyboard, XML reads dash as minus, that's all.

How do you write and in string?

In android studio, you can simply press Alt+Enter and it will convert for you.


1 Answers

Use the XML/HTML € entity:

€
like image 71
Guillaume Polet Avatar answered Sep 30 '22 21:09

Guillaume Polet