git/list[1] front-page[2] threads[3] people[4] search[5] about
Β 

Bug report: gitk unable to handle Unicode properly

From
LKLars Kiesow <lkiesow@uos.de>
Date
Apr 16, 2021, 16:21 UTC
Message-ID
<20210416182121.3c824c87@pc.home.lkiesow.io>

Hi everyone, while fixing some Unicode problems in a project, I noticed that gitk will not display Unicode characters correctly and may even crash if the branch name consists of Unicode characters.

I'ts certainly not the end of the world (who is crazy enough to use πŸ–€ as a branch name) but could still cause problems.

Please find some additional information below.

Best regards, Lars

What did you do before the bug happened? (Steps to reproduce your issue)
- Create a git branch named with a multi-byte Unicode character like:
        git checkout -b πŸ–€
- Launch gitk
    - Crash (see below)
- Switch to another branch
        git checkout xy
- Launch gitk
    - Branch names are not displayed properly
What did you expect to happen? (Expected behavior)
- Launching gitk, it should not crash and names like β€œπŸ–€β€ should be
  displayed correctly
What happened instead? (Actual behavior)
- Launching while on the branch β€œπŸ–€β€ crashed gitk.
  The reported error is:
        X Error of failed request:  BadLength (poly request too large or internal Xlib length error)
          Major opcode of failed request:  139 (RENDER)
          Minor opcode of failed request:  20 (RenderAddGlyphs)
          Serial number of failed request:  5225
          Current serial number in output stream:  5263
- Launching while on another branch but with the branch β€œπŸ–€β€ makes that
  branch appear as ⌷⌷
What's different between what you expected and what actually happened?
- gitk should launch and display Unicode characters correctly

[System Info] git version: git version 2.30.2 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 5.11.11-200.fc33.x86_64 #1 SMP Tue Mar 30 16:53:32 UTC 2021 x86_64 compiler info: gnuc: 10.2 libc info: glibc: 2.32 $SHELL (typically, interactive shell): /bin/zsh

[Enabled Hooks]
Next: brian m. carlson
Message 1 of 4 in β€œBug report: gitk unable to handle Unicode properly”
  1. Lars KiesowApr 16, 2021
  2. brian m. carlsonApr 16, 2021
  3. Chris TorekApr 17, 2021
  4. brian m. carlsonApr 17, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.