olikraus / u8g2

U8glib library for monochrome displays, version 2
Other
4.91k stars 1.03k forks source link

bdfconv wont't work on windows for cjk languages #2362

Open charlielee206 opened 5 months ago

charlielee206 commented 5 months ago

When running bdfconv to convert korean, japanese, and chinese characters, the windows version of bdfconv created an (in my case) unusable .c file. This problem does not happen on the linux version of the program. I do not know what went wrong, I only know that following the same steps on linux will work but not on windows.

I did not convert the entire CJK characterset, but only a couple of letters since I needed a small font that could fit on an nano with some space to spare. I only included one base font as an example, but this problem happened with every font that I tried.

The two images are run on the same code, same hardware, same everything, with the only exception being the font file.

Font used: Noto Sans medium Commands were generated by u8g2 Unifont helper

Commands I used for conversion Linux:

./bdfconv -v -f 1 -m "0-127,12352-12447,32,63,44192,45264,45285,46972,47476,47784,47792,47952,48372,48376,50504,50556,50612,50668,50752,51068,54616" Notosans_24.bdf -o unifont_custom.c -n unifont_custom -d Notosans_24.bdf

Windows (Tried both of these commands) :

bdfconv -v -f 1 -m "0-127,12352-12447,32,63,44192,45264,45285,46972,47476,47784,47792,47952,48372,48376,50504,50556,50612,50668,50752,51068,54616" Notosans_24.bdf -o unifont_custom.c -n unifont_custom -d Notosans_24.bdf

and

bdfconv.exe -v -f 1 -m "0-127,12352-12447,32,63,44192,45264,45285,46972,47476,47784,47792,47952,48372,48376,50504,50556,50612,50668,50752,51068,54616" Notosans_24.bdf -o unifont_custom.c -n unifont_custom -d Notosans_24.bdf

Converted on windows VS Converted on linux :

I have also uploaded the two outputs and the original .bdf file

olikraus commented 5 months ago

I don't remember exactly, but there might be a single quote vs. double quote issue.