cmatrix icon indicating copy to clipboard operation
cmatrix copied to clipboard

Japanese characters not working with the -c flag

Open itsmokha opened this issue 3 years ago • 10 comments

When using the -c flag, the only thing on the screen is grey boxes.

Screenshots

Screenshot_2021-11-09-05-29-11_1920x1080

Japanese Characters work on the terminal though.

Screenshot_2021-11-09-05-35-57_1920x1080

  • OS: Archcraft
  • Version 3.0 (compiled from Github, commit 3112b12)

Edit: Terminal: Alacritty, but doesn't work on Xfce either

itsmokha avatar Nov 09 '21 13:11 itsmokha

Same here, not working on WSL Ubuntu

Ubuntu 20.04 ZSH shell / Bash Shell

optimbro avatar Nov 14 '21 08:11 optimbro

Same here on Artix, except it's a bunch of random characters the same colour as the terminal.

MaybeAnonymous avatar Nov 24 '21 14:11 MaybeAnonymous

Same here, WSL Ubuntu.

5.10.60.1-microsoft-standard-WSL2

ankhbayar-a avatar Nov 28 '21 08:11 ankhbayar-a

@abishekvashok, Hello. I also experienced the issue on MacOS Mojava 10.14.6
I believe I have a fix for the above problem, and i've forked this project and commited my changes to the cmatrix.c source. I found the following:

  • My version of ncurses was not the problem
  • the Decimal range of UTF-8 Characters was slightly off
  • there are 5-6 UTF-8 characters in the mid range of the Hiragana which make things 'strange'
  • dealing with 'wide' characters such as japanese Hiragana/Katakana requires certain data types. I struggled with this for about 4-5 hours before coming to my solution that didn't require any explicit conversions (simply making use of this wide data type)

Some problems with my solution:

  • Rainbow simply crawls very slowly and spins my CPU fan up.

  • Sometimes a 'head' will propogate it's 'white/bold' characteristics backwards and you'll have some pure white bars. I think it's quite pretty so I consider it more of a feature than a bug.

  • No idea on the performance impact

I've never actually programmed in C, probably my formatting is horrendous and this is also my first time using github, but I hope I've followed your contribution guidelines okay, by reaching out here first before submitting a pull request (if indeed my code would be accepted)

example

me93-ghb avatar Jan 08 '22 22:01 me93-ghb

any progress on it?? which Fonts do I need to install?

WuglyakBolgoink avatar Apr 12 '22 08:04 WuglyakBolgoink

@me93-ghb I will be happy to take a look at your fix

abishekvashok avatar Apr 19 '22 10:04 abishekvashok

Hey, please take a look & let me know.I am realising now that the "Real Matrix" uses "half character " Katakana, so my change doesn't really align to the original with that respect, but I just looked up the unicode ranges that seemed to make sense for me.However it is a nice interpretation, using full width characters like that is quite nice!I think there are a few conversations now about there being blank spaces, not sure my way was the best way! But please check my fork and let me know. I would also be keen to know what I did "right" or "wrong" as I don't actually know this programming language ;)ThanksOliver On 19 Apr 2022 12:52, Abishek V Ashok @.***> wrote: @me93-ghb I will be happy to take a look at your fix

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.> On 19 Apr 2022 12:52, Abishek V Ashok @.> wrote: @me93-ghb I will be happy to take a look at your fix

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.> On 19 Apr 2022 12:52, Abishek V Ashok @.> wrote: @me93-ghb I will be happy to take a look at your fix

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

me93-ghb avatar Apr 19 '22 11:04 me93-ghb

Any updates on this? I have tried to install multiple fonts specifically for Japanese characters, but doesn't work. Arch Linux, Gnome 44, Kitty Terminal on zsh.

iceeburr avatar Jul 28 '23 11:07 iceeburr

Hey - I think I forked my solution to this (albeit hacky) so you can try to compile my version . I really think it’s because it was using full width characters instead of half width characters. Some Japanese fonts do have both though afaik…My solution was to implement for full width characters.Kr,ISent from my iPhoneOn 28 Jul 2023, at 20:18, iceeburr @.***> wrote: Any updates on this? I have tried to install multiple fonts specifically for Japanese characters, but doesn't work. Arch Linux, Gnome 44, Kitty Terminal on zsh.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

me93-ghb avatar Jul 28 '23 15:07 me93-ghb

How do I install fonts? I installed with apt install cmatrix Get error setfont: ERROR setfont.c:402 kfont_load_font: Cannot find default font cmatrix -lbac: image

p1r473 avatar Feb 12 '24 05:02 p1r473