【Solved 】How to display Chinese?

Hi everyone, I have a question.
I used the online tool to generate a Chinese and English mixed font, and it has been declared in the configuration file. When used, only English is displayed normally, and Chinese is not displayed. How can I am modified?
Thanks a lot.:heavy_heart_exclamation:


2
1
1
my_font_CH.c (10.2 KB)

Be sure, you editor has UTF8 encoding.

What do you get for this?

    uint8_t ch_buf[] = "测";
    uint8_t i;
    for(i = 0; ch_buf[i] !='\0'; i++) {
        printf("%x\n", ch_buf[i]);
    }

It should be:

e6
b5
8b

Thank you for your help. I will go home and try this later.
6.0 and 5.x are not the same. I changed it according to a 5.x tutorial. I changed the font’s unicode definition to uint32 and I can see that there is an error display.

My editor have utf8 encoding.
I tested the code in my main function,but my result was wrong.
Maybe this is the problem, my result is
b2
e2.
I’ll check around.thanks!:grinning:

1 Like

In this case it should be how your IDE saves/handles strings.

Thanks very much for your help, perhaps because my vs version is CH. Put it temporarily. The porting of 6.0 is not very smooth. I will learn it again with the simulator, familiarize myself with the whole library, and then try it better.:grinning:

@hiVGL Maybe you can avoid the need for a UTF-8 editor by encoding your UTF-8 characters using the \u escape code.

thanks!it’s a good idea,I’ll try this later.:smile:

@kisvegabor @embeddedt Thank you very much for your advice.:smiley: I have solved the problem of displaying Chinese characters. It’s really a coding error.

I try your method with your font C document,I even changed my visual studio IDE with UTF8,but it still display nothing,I don’t know why,would you like to help me ?

yes. I’d love to. I don’t know which version and simulator you use. I can give you an example. I canceled the group I set up. This is agood lvgl group 686338051. Welcome to join the discussion.

What program was used to create the font?

Which font?

ILI9488 doesn’t support RGB565 with 16-bit SPI. You need to send 3 bytes and convert every pixel to a compatible format.
So ILI9488 will be slower than ILI9431.

Me too
why
image