Skip to content

fix(polyfill,pixi): Intl without ICU data on Linux - #213

Merged
triniwiz merged 3 commits into
masterfrom
fix/polyfill-intl-segmenter
Nov 13, 2026
Merged

triniwiz merged 3 commits into
masterfrom
fix/polyfill-intl-segmenter

Conversation

@triniwiz

Copy link
Copy Markdown
Member

The Linux runtime's V8 has no ICU data, which broke two common calls:

  • Intl.Segmenter. It exists but supports no locale, and segment() crashes V8 outright (SIGSEGV). PixiJS splits every bitmap-font string with it, so the first label in any PixiJS app killed the process, on WebGL or WebGPU. The polyfill now removes a Segmenter that supports no locale, so libraries that feature-detect it fall back. canvas-pixi also resets PixiJS's grapheme splitter, which PixiJS picks when it loads, possibly before the polyfill runs.
  • Number#toLocaleString. It throws "Internal error. Icu error.". When it does, the polyfill replaces it with an en-US rendering: grouping, minimum/maximum fraction digits and percent. That matches Intl's output for those options, compared against Node.

canvas-chartjs already polyfills Intl for its own use on Linux; this covers every library. The underlying fix belongs in the Linux runtime (ship ICU data).

Testing

Linux: the @pixi/3d examples no longer crash at their first label, and debug_thumbnails (which formats numbers) runs. The polyfill and canvas-pixi packages have no new type errors.

The Linux runtime's V8 ships Intl.Segmenter without ICU's segmentation data:
supportedLocalesOf() lists nothing and segment() crashes V8 (SIGSEGV). PixiJS
splits every bitmap-font string with it, so the first label in any PixiJS app
took the process down, whatever the renderer.

The polyfill now removes a Segmenter that supports no locale, so libraries
that feature-detect it fall back. canvas-pixi also resets PixiJS's grapheme
splitter, which PixiJS picks when it loads, possibly before the polyfill runs.
Where V8 has no ICU data (the Linux runtime), Number#toLocaleString throws
"Internal error. Icu error.". When it does, the polyfill replaces it with an
en-US rendering: digit grouping, minimum/maximum fraction digits and percent,
matching Intl's output for those.
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 95c62f23-da5d-48ae-be7f-a2dd576ad860

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@triniwiz
triniwiz merged commit 90d62c7 into master Nov 13, 2026
3 of 23 checks passed
@triniwiz
triniwiz deleted the fix/polyfill-intl-segmenter branch November 13, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant