Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Android RTL Rendering Mathematical Symbols and Number Groups Backwards

未关闭
#54,713 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
android, react-native

调研方向

运行必需的 Expo 54 reproducer,并将其 Android RTL 输出与 Expo 52 示例进行比较,重点关注 React Native 0.76.9 与 0.79.5/0.81.5 的差异。完成的标准是确定 Android 是否能够匹配之前对数学符号和数字分组的 LTR 处理,或提供有文档说明的 opt-out,而不要求为每个值添加 \u200E 字符。

由索引模型根据 Issue 内容生成。

描述

Issue: Author Provided Repro Platform: Android
Description

Since upgrading to Expo 53/54, we are seeing a big change in how numbers are rendered in Arabic mode (RTL) on Android.

Here are some examples of differences we're seeing (tested on both Expo 53 and Expo 54 using 0.79.5 and 0.81.5 respectively)
Expo 52 (RN 0.76.9): -123.456
Expo 53 (RN 0.79.5): 123.456-
Expo 54 (RN 0.81.5): 123.456-

Expo 52 (RN 0.76.9): +455.234
Expo 53 (RN 0.79.5): 455.234+
Expo 54 (RN 0.81.5): 455.234+

Expo 52 (RN 0.76.9): 12 - 13 = 25
Expo 53 (RN 0.79.5): 25 = 13 - 12
Expo 54 (RN 0.81.5): 25 = 13 - 12

I'm unable to find any documentation regarding this change which is not being applied on iOS (causing a lot of differences between the two devices). Please see the attached screenshots for more details.

Expo 52 repo: https://github.com/steinalex/expo-52-arabic-numbers
Expo 54 repo: https://github.com/steinalex/expo-54-arabic-numbers

Is there a way to opt out of this on Android and always render numbers with mathematical symbols in LTR mode?

The only way around it so far is to manually inject the LRT unicode character '\u200E' everywhere, but that's not a viable solution for our very large project.

Whilst I'm using Expo templates to help generate a minimal example, I do not believe this is an Expo specific issue.

Steps to reproduce
  1. Install the minimal retro
  2. Observe the difference in the numbers being rendered between React Native versions
React Native Version

0.79.5+

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info
System:
  OS: macOS 15.7.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 156.45 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.17.1
    path: /Users/alex.stein/.asdf/installs/nodejs/22.17.1/bin/node
  Yarn:
    version: 1.22.19
    path: /Users/alex.stein/.asdf/shims/yarn
  npm:
    version: 10.9.2
    path: /Users/alex.stein/.asdf/plugins/nodejs/shims/npm
  Watchman:
    version: 2025.03.10.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.1
      - iOS 26.1
      - macOS 26.1
      - tvOS 26.1
      - visionOS 26.1
      - watchOS 26.1
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.24978.46.2431.13208083
  Xcode:
    version: 26.1.1/17B100
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.16.1
    path: /Users/alex.stein/.asdf/shims/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 19.1.0
    wanted: 19.1.0
  react-native:
    installed: 0.81.5
    wanted: 0.81.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found
Stacktrace or Logs
N/A
MANDATORY Reproducer

https://github.com/steinalex/expo-54-arabic-numbers

Screenshots and Videos
Expo 52 (Android) Expo 54 (Android)
Image Image
主要语言
C++
星标
127k
派生
25.3k
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

react/react-native 的其他 Issue

查看 react/react-native 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。