Skip to content

[Bug] 由多个 codepoint 组成的 emoji 显示异常 #403

Description

@10ta

Operating system / 操作系统

Windows

OS version and display / 系统版本与显示

Windows 11 24H2

Pebrel version / 版本号

2.0.0

How did you install Pebrel? / 安装方式

GitHub Release (.exe / .zip / .dmg / .AppImage / .deb)

Shell in the affected pane / 出问题的面板用的 Shell

fish

Program running in the pane / 面板里正在跑的程序

Nothing, plain shell prompt / 什么都没跑

Connection type / 连接方式

SSH via Pebrel host list / Pebrel 内 SSH 主机

Affected area / 影响范围

Terminal rendering / scrolling / selection / garbled text — 终端渲染、滚动、选区、乱码

Did it work in a previous version? / 旧版本是否正常?

No, it never worked / 一直如此

Can you reproduce it? / 复现概率

Always (100%) / 必现

Steps to reproduce / 复现步骤

  1. 打开 Pebrel,新建终端面板
  2. 执行下面的命令,前半是单 codepoint 的对照组(正常),后半是多 codepoint 组合 emoji(异常):

# echo "单个(正常): 🔥 😀 🚀 🎉 🐦 | 组合(异常): 👨‍👩‍👧 🏳️‍🌈 ❤️‍🔥 🐦‍⬛ 🙂‍↔️ 👍🏽 🇨🇳"

Expected behavior / 期望结果

每个组合 emoji 应作为一个 grapheme cluster,渲染成单个 glyph(占 2 列宽),效果与其他终端一致。
与其他终端对比渲染结果
Image

Actual behavior / 实际结果

所有多 codepoint 的 emoji 都被拆开渲染:

ZWJ 序列被拆成多个独立 emoji,例如 👨‍👩‍👧 变成 👨👩👧,🏳️‍🌈 变成 🏳 + 🌈,🐦‍⬛ 变成 🐦 + ⬛
肤色修饰符被单独渲染成色块,例如 👍🏽 变成 👍 + 🟫 色块
国旗没有合成,显示为带框的字母 US JP

只有单 codepoint 的 emoji(🔥 😀 🚀 🎉 🐦)显示正常。

Logs / screenshots / 日志或截图

分析 / Analysis

现象覆盖 ZWJ、肤色修饰符、区域指示符三类,共同点是一个 grapheme cluster 包含多个 codepoint。推测 Pebrel 的终端渲染层是按单个 codepoint 分配 cell 和查找字形,没有按 Unicode 扩展字素簇(UAX #29)切分,所以每个 codepoint 各占一格、各自渲染。

Non-default settings / 改过的设置

theme=CatppuccinMacchiato
follow_system_theme=0
background=#1a2823
pane_card_radius=0
pane_card_gutter=0
pane_card_shadow=0
pane_card_divider=1
custom_theme=
theme_foreground=
language=fr-FR
font_size=15.00
cell_width_mode=relaxed
font_family_cjk=Twemoji, LXGW Neo XiHei
font_family=Inconsolata LGC Nerd Font
quick_terminal_width=1550.6666
quick_terminal_height=1102.6666
density=standard
ligatures=off
opacity=0.75
blur=mica-alt
background_image=C:\1.jpg
background_image_cover_chrome=1
ai_hooks_claude=0

Before submitting / 提交前确认

  • I searched existing issues and did not find a duplicate / 已搜索,无重复
  • I tested with the latest release / 已用最新版本试过
  • I removed passwords, private keys, tokens and other secrets / 已删除敏感信息

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: sshSSH 连接、主机管理、密钥、代理/跳板area: terminalPTY、VT 解析、网格渲染、滚动、选区bug缺陷:行为与预期不符 / something isn't workingos: windows仅 Windows 或与 ConPTY/Win32 相关triage待维护者初审 / not yet reviewed

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions