Skip to content

Nerd Font glyphs above U+FFFF not supported #4187

Closed

Description

@ylub

Taskwarrior appears to have trouble displaying Nerd Font glyphs whose Unicode code points are above U+FFFF (five hexadecimal digits).

For example, Nerd Font glyphs such as U+F0A48 and U+F166C do not display correctly when used in Taskwarrior configuration/report output, but four-digit glyphs such as U+F251 or U+F252 work as expected.

The five-digit glyphs display terminal when printed directly from the shell, so this does not appear to be a terminal or font configuration issue.

Expected behavior

Taskwarrior should preserve and display Unicode characters outside the Basic Multilingual Plane (code points above U+FFFF) in the same way that the terminal displays them.

Actual behavior

Nerd Font glyphs with five-digits do not render correctly in Taskwarrior output, while four-digit Nerd Font glyphs do.

Example

These work:

U+F251
U+F252

These do not:

U+F0A48
U+F166C

All of these glyphs are available in the installed Nerd Font and can be displayed normally outside Taskwarrior.

Environment

  • Taskwarrior: 3.5.0
  • OS: macOS
  • Terminal: iTerm2
  • Font: Nerd Font (I use Fera)

Would support for Unicode characters above U+FFFF be feasible?

Activity

  1. djmitche commented on Sep 8, 2026

    @djmitche
    Member

    Is this the same as GothenburgBitFactory/libshared#116?

    Taskwarrior uses libshared for Unicode support (and lots of other things). Libshared sort of "rolls its own" Unicode support so I believe there are Unicode developments since it was written that it does not support.

  2. ylub commented on Sep 8, 2026

    @ylub
    Author

    @djmitche I did a search before posting this and that did not come up - it appears that was a different issue as I was getting five little ? glyphs instead of the real glyph but anything in the F### range worked it was the five digit ones that still didn't.

  3. djmitche commented on Sep 8, 2026

    @djmitche
    Member

    Can you post some screenshots of what you're seeing?

  4. added
    topic:encodingsIssues related to character encodings like UTF-8 and Latin-1
    on Sep 8, 2026
  5. ylub commented on Sep 8, 2026

    @ylub
    Author

    Exhibit A

    The glyph I will be using as well as the version of task
    Image

    Exhibit B

    The glyph appears correctly on the first go. (I edited out a typing mistake)

    Image

    Exhibit C

    The failure of said glyph after a task is modified. Seems the issue is a little more nuanced because when I initially created the task, the glyph did appear but only after a tag was added and removed did it get weird.
    Image

  6. djmitche commented on Sep 8, 2026

    @djmitche
    Member

    Hm, it sounds like it's failing to make a round-trip somewhere. Did you by chance use task edit or was that change at 11:05:23 just task 91 mod +egg?

  7. ylub commented on Sep 8, 2026

    @ylub
    Author

    I have been using modify when I update tasks I just turned it on and off basically

  8. djmitche commented on Sep 9, 2026

    @djmitche
    Member

    Hm, that seems like I should be able to reproduce it, but it works for me:

    ⸩ cat foo.sh
    task add '󰩘 foo'
    task _get 1.description | xxd
    task 1 mod +egg
    task _get 1.description | xxd
    task 1 mod -egg
    task _get 1.description | xxd
    task 1 info
    ⸩ bash foo.sh 
    Created task 1.
    00000000: f3b0 a998 2066 6f6f 0a                   .... foo.
    Modifying task 1 '󰩘 foo'.
    Modified 1 task.
    00000000: f3b0 a998 2066 6f6f 0a                   .... foo.
    Modifying task 1 '󰩘 foo'.
    Modified 1 task.
    00000000: f3b0 a998 2066 6f6f 0a                   .... foo.
    
    Name          Value                               
    ID            1                                   
    Description   󰩘 foo
    Status        Pending                             
    Entered       2026-09-08 21:22:36 ()
    Last modified 2026-09-08 21:22:36 ()              
    Virtual tags  LATEST PENDING READY UNBLOCKED
    UUID          5be4547c-2550-4949-bf44-d06d730ded71
    Urgency       0
    
    Date                Modification                       
    2026-09-08 21:22:36 Description set to '󰩘 foo'.         
                        Entry set to '2026-09-08 21:22:36'.
                        Status set to 'pending'.           
                        Tag 'egg' added.                   
                        Tag 'egg' deleted.                 
    .
    

    any idea what I'm missing?

  9. ylub commented on Sep 9, 2026

    @ylub
    Author

    Seems like the problem only occurs when an on-modify hook is enabled.

    I replaced the real hook with a minimal passthrough hook without JSON parsing or manipulation at all:

    #!/usr/bin/env python3
    
    import sys
    
    lines = [line for line in sys.stdin if line.strip()]
    
    if not lines:
        sys.exit(0)
    
    print(lines[-1], end="")

    Then:

    task add '󰩈 glyph test'
    task +LATEST mod +foo
    task +LATEST info

    The glyph still failed after the modification.

    With hooks disabled:

    task rc.hooks=0 ...

    the glyph survives correctly.

    So this does not appear to be caused by Python json.loads/json.dumps, ensure_ascii, or my hook logic. Simply round-tripping Taskwarrior's own task JSON through an on-modify hook is enough to reproduce it.

    If your attempt didn't have one of these hooks, it would not have recreated the issue.

  10. ylub commented on Sep 10, 2026

    @ylub
    Author

    Looks like it was definitely not a core taskwarrior issue!

    Used a local skill in codex to scan my setup because I was worried it was in my tw-roll-crunch and found that the problem was in a different script (track) that I use to sync task timew and my personal time-tracking/invoicing CLI:

    Image

    I do appreciate your time invested in this project as a whole and this "issue" specifically!

  11. djmitche commented on Sep 10, 2026

    @djmitche
    Member

    Awesome, I'm glad it got solved. Surrogate pairs are the bane of the encoding-related parts of my existence.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic:encodingsIssues related to character encodings like UTF-8 and Latin-1

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions