Skip to content

Rendering issues with emojis or "zalgo" text #997

Open

Description

@bersLucas

  1. uname -a:
Linux pop-os 5.4.0-7634-generic #38~1596560323~20.04~7719dbd-Ubuntu SMP Tue Aug 4 19:12:34 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
  1. cmus --version:
cmus v2.8.0
Copyright 2004-2006 Timo Hirvonen
Copyright 2008-2016 Various Authors

  1. cmus --plugins:
Input Plugins: /usr/lib/cmus/ip
  mad:
    Priority: 55
    File Types: mp3 mp2
    MIME Types: audio/mpeg audio/x-mp3 audio/x-mpeg
  cdio:
    Priority: 50
    File Types:
    MIME Types: x-content/audio-cdda
  opus:
    Priority: 50
    File Types: opus
    MIME Types:
  aac:
    Priority: 50
    File Types: aac
    MIME Types: audio/aac audio/aacp
  cue:
    Priority: 50
    File Types:
    MIME Types: application/x-cue
  vorbis:
    Priority: 50
    File Types: ogg oga ogx
    MIME Types: application/ogg audio/x-ogg
  flac:
    Priority: 50
    File Types: flac fla
    MIME Types:
  modplug:
    Priority: 50
    File Types: mod s3m xm it 669 amf ams dbm dmf dsm far mdl med mtm okt ptm stm ult umx mt2 psm
    MIME Types:
  wavpack:
    Priority: 50
    File Types: wv
    MIME Types: audio/x-wavpack
  mpc:
    Priority: 50
    File Types: mpc mpp mp+
    MIME Types: audio/x-musepack
  wav:
    Priority: 50
    File Types: wav
    MIME Types:
  ffmpeg:
    Priority: 30
    File Types: aa aac ac3 aif aifc aiff ape au fla flac m4a m4b mka mkv mp+ mp2 mp3 mp4 mpc mpp ogg shn tak tta wav webm wma wv
    MIME Types:

Output Plugins: /usr/lib/cmus/op
  pulse
  alsa
  jack
  ao

Given the following album: https://dismissyourself.bandcamp.com/album/000-deluxe-edition

The special charecters in the track and artist names causes some rendering issues when hovering over the artist name in the library view. I'm using Bash 5.0.17(1)-release on the Gnome terminal

cmus

Activity

  1. jcpst commented on Mar 31, 2021

    @jcpst

    I'd like to report that I'm experiencing this same issue (rather than create a duplicate).

    Without emoji

    Screen Shot 2021-03-31 at 1 37 06 PM

    With emoji

    Screen Shot 2021-03-31 at 1 37 22 PM

    1. uname -a:
    Darwin KCMACLT1 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
    
    1. cmus --version:
    cmus v2.9.1
    Copyright 2004-2006 Timo Hirvonen
    Copyright 2008-2016 Various Authors
    
    1. cmus --plugins:
    Input Plugins: /usr/local/Cellar/cmus/2.9.1/lib/cmus/ip
      mad:
        Priority: 55
        File Types: mp3 mp2
        MIME Types: audio/mpeg audio/x-mp3 audio/x-mpeg
      opus:
        Priority: 50
        File Types: opus
        MIME Types:
      wav:
        Priority: 50
        File Types: wav
        MIME Types:
      mp4:
        Priority: 50
        File Types: mp4 m4a m4b
        MIME Types:
      cue:
        Priority: 50
        File Types:
        MIME Types: application/x-cue
      aac:
        Priority: 50
        File Types: aac
        MIME Types: audio/aac audio/aacp
      flac:
        Priority: 50
        File Types: flac fla
        MIME Types:
      vorbis:
        Priority: 50
        File Types: ogg oga ogx
        MIME Types: application/ogg audio/x-ogg
      ffmpeg:
        Priority: 30
        File Types: aa aac ac3 aif aifc aiff ape au fla flac m4a m4b mka mkv mp+ mp2 mp3 mp4 mpc mpp ogg opus shn tak tta wav webm wma wv
        MIME Types:
    
    Output Plugins: /usr/local/Cellar/cmus/2.9.1/lib/cmus/op
      coreaudio
    
  2. nefthy commented on Mar 31, 2021

    @nefthy
    Collaborator

    could you post the output of id3info your.mp3 for the mp3 with the smiley?

  3. jcpst commented on Apr 1, 2021

    @jcpst
    *** Tag information for JPEGMAFIA - Veteran - 11 😱.m4a
    
  4. nefthy commented on Apr 1, 2021

    @nefthy
    Collaborator

    I think the problem here is that the smiley takes up two characters instead of one, which probably has to do with the font used. I'm not sure cmus can do much about that.

    @pgaskin any ideas?

  5. nefthy commented on Apr 1, 2021

    @nefthy
    Collaborator
    *** Tag information for JPEGMAFIA - Veteran - 11 😱.m4a
    

    id3info does not work for m4a files. exiftool -a file.m4a might do the trick.

  6. pgaskin commented on Apr 1, 2021

    @pgaskin
    Member

    I've seen this too, and I suspect it's something to do with the individual character width vs the combined character width, or that it's due to character width differences between Unicode versions (but I'd have to do some research about this, since I'm not completely familiar with it). It's also possible it's a terminal emulator or font issue, but that's less likely since this has happened on every one I use regularly. I'll have to play around with it a bit and do some research when I have time (I might spend a few minutes soon, but I won't be able to do anything major until I have more time).

  7. jcpst commented on Apr 1, 2021

    @jcpst

    Thanks for the discussion and following up so far. Been a fan of this player for years 😃. Here's the result of running exiftool.

    ❯ exiftool -a JPEGMAFIA\ -\ Veteran\ -\ 11\ 😱.m4a
    ExifTool Version Number         : 12.16
    File Name                       : JPEGMAFIA - Veteran - 11 😱.m4a
    Directory                       : .
    File Size                       : 3.2 MiB
    File Modification Date/Time     : 2021:04:01 13:37:37-05:00
    File Access Date/Time           : 2021:04:01 13:37:37-05:00
    File Inode Change Date/Time     : 2021:04:01 13:37:37-05:00
    File Permissions                : rw-------
    File Type                       : MP3
    File Type Extension             : mp3
    MIME Type                       : audio/mpeg
    ID3 Size                        : 128
    Title                           : 
    Artist                          : 
    Album                           : 
    Year                            : 
    Comment                         : 
    Genre                           : None
    
  8. pgaskin commented on Apr 1, 2021

    @pgaskin
    Member
  9. nick87720z commented on Dec 30, 2021

    @nick87720z

    Not sure, is it better to create new bug, as I got problem trying to use emojis in status, also experiencing problems with width. For now I tried two chars:

    • U+1F50A SPEAKER WITH THREE SOUND WAVES: instead of "vol:" in status (works fine in term title, though it doesn't update for anything but audiofile change):
      {?volume>=0?🔊%{?lvolume!=rvolume?%{lvolume},%{rvolume}?%{volume}}}%%%
      This did not cause any visible size issues, but repeat char 🔁 (U+1F501) ate some space (insead of R in status end).
      First - it refused to appear on its own. Second char after it (e.g. space) made it to appear, though if this char is printable, it doesn't appear itself. Anyway, result is a bit wider and sometimes status line is wrapped. Working part from status line: %1{?repeat="R"?🔁 }
  10. gavtroy commented on Dec 31, 2021

    @gavtroy
    Collaborator

    The problem is basically that the code has an extremely simplistic and limited awareness of unicode and which characters are wide or narrow. If we want to properly support everything we should find a library.

    In the meantime I propose some simple changes in #1151 that mask the issue for the most part. To be clear, it won't fix every character.

  11. gavtroy commented on Dec 31, 2021

    @gavtroy
    Collaborator

    For testing and reference, attaching a metadata-only version of the T€∆M M£K4NØ album demoed in the first post; emoji_zalgo_test_album.tar.gz

  12. gavtroy commented on May 22, 2022

    @gavtroy
    Collaborator

    The latest proposed fix for this issue is #1198.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions