Skip to content

UTF-8 Text Not Displaying Correctly #2

@TsybulkaM

Description

@TsybulkaM

Description: UTF-8 encoded text (especially Cyrillic and other non-ASCII characters) displays as garbled characters or artifacts when using the Cmd_Text() function.

Environment:

  • Platform: Ubuntu 24.04

Expected Behavior: UTF-8 text should display correctly, including Cyrillic characters like "Привет" or other Unicode symbols.

Actual Behavior: Non-ASCII UTF-8 characters appear as garbled text or empty boxes.

Root Cause: The issue occurs due to sign extension when casting char to uint32_t. UTF-8 bytes with values > 127 (0x7F) have the high bit set, causing:

  • Byte 0xD0 (208) becomes 0xFFFFFFD0 instead of 0x000000D0
  • This corrupts the UTF-8 byte sequences sent to the EVE chip

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