Skip to content

ZWJ emoji sequences render with visible <200d> in VoltraText #68

@better-off-bot

Description

@better-off-bot

Description

ZWJ (Zero Width Joiner) emoji sequences like ❤️‍🔥 (heart on fire), 👨‍👩‍👧 (family), or 🏳️‍🌈 (rainbow flag) render incorrectly in Live Activities. Instead of displaying as a single combined emoji, the ZWJ character (U+200D) appears as literal text <200d>.

Expected: ❤️‍🔥
Actual: ❤️<200d>🔥

Root Cause

In ios/ui/Views/VoltraText.swift (line 43):

Text(.init(textContent))

This uses LocalizedStringKey.init() which parses the string for Markdown interpolation and localization placeholders. The ZWJ character (U+200D) is being misinterpreted by the LocalizedStringKey parser and rendered as <200d> instead of being treated as an invisible joiner character.

Suggested Fix

Change:

Text(.init(textContent))

To:

Text(verbatim: textContent)

Text(verbatim:) treats the string literally without any Markdown or localization parsing, which should preserve ZWJ sequences correctly.

Environment

  • voltra version: 1.1.0
  • iOS version: 17+
  • Tested in Live Activities

Reproduction

  1. Create a Live Activity with text containing a ZWJ emoji (e.g., ❤️‍🔥)
  2. Observe that the emoji renders as separate components with visible <200d> text

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions