microsoft / microsoft/react-native-windows

"hello".toLocaleUpperCase() and Intl.getCanonicalLocales(['und']) issues

Open
#14,741 15 comments 0 reactions 2 assignees View on GitHub

@iamAbhi-916 is already working on this.

Since Nov 10, 2025.

Area: JavaScript Engine bug
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Problem Description

"hello from 0.78".toLocaleUpperCase() returns "uppered" string not "HELLO FROM 0.78" what i was expecting and is returned in RNW 0.77.

Intl.getCanonicalLocales(['und']) fails to RangeError: Invalid language tag: und.

Same issues now also on RNW 0.79.

Steps To Reproduce

Create HelloWorld 0.78 or 0.79

npx @react-native-community/cli init hello078 --version "0.78.2"
cd hello078
yarn add react-native-windows@0.78.6
npx react-native init-windows --overwrite --template old/uwp-cs-app

add logs into app

const localeHello = 'hello world 0.78'.toLocaleUpperCase();
const hello = 'hello world 0.78'.toUpperCase();
console.log({hello, localeHello});

and log is

LOG {"hello": "HELLO WORLD 0.78", "localeHello": "uppered"}

Expected Results

LOG {"hello": "HELLO WORLD 0.78", "localeHello": "HELLO WORLD 0.78"}

CLI version

15.0.1

Environment
info Fetching system and libraries information...
System:
  OS: Windows 10 10.0.19045
  CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
  Memory: 17.64 GB / 31.90 GB
Binaries:
  Node:
    version: 20.18.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.19
    path: C:\Program Files (x86)\Yarn\bin\yarn.CMD
  npm:
    version: 10.8.2
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    AllowAllTrustedApps: Enabled
    Versions:
      - 10.0.18362.0
      - 10.0.19041.0
      - 10.0.22000.0
      - 10.0.22621.0
      - 10.0.26100.0
IDEs:
  Android Studio: Not Found
  Visual Studio:
    - 17.14.36202.13 (Visual Studio Community 2022)
Languages:
  Java: Not Found
  Ruby:
    version: 2.6.1
    path: C:\Ruby26-x64\bin\ruby.EXE
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.78.2
    wanted: 0.78.2
  react-native-windows:
    installed: 0.78.6
    wanted: 0.78.6
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Community Modules

No response

Target Platform Version

None

Target Device(s)

No response

Visual Studio Version

None

Build Configuration

None

Snack, code example, screenshot, or link to a repository

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.