skip to Main Content

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


  1. You can display each of these characters like this without giving up your UTF-8 encoding.

    To display "é" use &#233; or &eacute;

    To display "á" use &#225; or á`

    To display "í" use &#237; or &iacute;

    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.

    Login or Signup to reply.
  2. 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 says FLIPPER_VERSION=0.125.0 to FLIPPER_VERSION=0.145.0.

    Source: https://github.com/facebook/react-native/issues/34066

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search