I have an android app built in React Native.
In android/app/src/main/res/values/strings.xml
i have the app name with diacritics, but app is crashing while opening because of the special characters í and ó.
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="app_name">Parkovací zóny Brno</string>
</resources>
This name works, but i need it to be localized as above:
<string name="app_name">ParkovaciZonyBrno</string>
I’ve tried to use unicode U+00F3 or with excaping U+00F3 or html entity, but nothing works.
Can you please point me to the right direction how can i use diacritics in the app name?
2
Answers
You can display each of these characters like this without giving up your UTF-8 encoding.
To display "é" use
é
oré
To display "á" use
á or
á`To display "í" use
í
orí
In each of these cases you write &…; in place of the letter, including the semicolon. So to write the word "éclair" you would use éclair.
For more symbols you can find a pretty complete reference https://www.w3schools.com/charsets/ref_html_8859.asp.
This is a bug in the version of Flipper that currently ships with React Native. The solution is to update the Flipper version.
The Flipper version is defined in
android/gradle.properties
. Change the line which saysFLIPPER_VERSION=0.125.0
toFLIPPER_VERSION=0.145.0
.Source: https://github.com/facebook/react-native/issues/34066