Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use gb2312 in C style #2198

Open
songzhishuo opened this issue Jun 7, 2023 · 16 comments
Open

How to use gb2312 in C style #2198

songzhishuo opened this issue Jun 7, 2023 · 16 comments

Comments

@songzhishuo
Copy link

I tried using gb2312 font under C code, but it doesn't display. “u8g2_DrawStr”、“u8g2_DrawUTF8”、“u8g2_DrawGlyph” can not display。 could you tell me whitch API can display GB2312 font

@olikraus
Copy link
Owner

olikraus commented Jun 7, 2023

Code? Any Error Message?

@njuFerret
Copy link

I tried using gb2312 font under C code, but it doesn't display. “u8g2_DrawStr”、“u8g2_DrawUTF8”、“u8g2_DrawGlyph” can not display。 could you tell me whitch API can display GB2312 font

If you simply need to display Chinese characters, it's a good idea to save the source in UTF-8 encoding and use u8g2_DrawUTF8 to draw the characters.

@songzhishuo
Copy link
Author

I tried using gb2312 font under C code, but it doesn't display. “u8g2_DrawStr”、“u8g2_DrawUTF8”、“u8g2_DrawGlyph” can not display。 could you tell me whitch API can display GB2312 font

If you simply need to display Chinese characters, it's a good idea to save the source in UTF-8 encoding and use u8g2_DrawUTF8 to draw the characters.

A magical thing happened. I changed the encoding format of vscode from gb2312 to utf-8, but the font library is in gb2312 format, which can be displayed using API u8g2_DrawUTF8.unbelievable

@njuFerret
Copy link

I tried using gb2312 font under C code, but it doesn't display. “u8g2_DrawStr”、“u8g2_DrawUTF8”、“u8g2_DrawGlyph” can not display。 could you tell me whitch API can display GB2312 font

If you simply need to display Chinese characters, it's a good idea to save the source in UTF-8 encoding and use u8g2_DrawUTF8 to draw the characters.

A magical thing happened. I changed the encoding format of vscode from gb2312 to utf-8, but the font library is in gb2312 format, which can be displayed using API u8g2_DrawUTF8.unbelievable

I'm not sure what "the font library is in gb2312 format" means, but if you are referring to the u8g2_fonts.c file, it is possible that the source file does not contain any Chinese characters. Therefore, encoding in utf-8 and gb2312 formats would be the same.

nnd,英语累死了

@songzhishuo
Copy link
Author

I tried using gb2312 font under C code, but it doesn't display. “u8g2_DrawStr”、“u8g2_DrawUTF8”、“u8g2_DrawGlyph” can not display。 could you tell me whitch API can display GB2312 font

If you simply need to display Chinese characters, it's a good idea to save the source in UTF-8 encoding and use u8g2_DrawUTF8 to draw the characters.

A magical thing happened. I changed the encoding format of vscode from gb2312 to utf-8, but the font library is in gb2312 format, which can be displayed using API u8g2_DrawUTF8.unbelievable

I'm not sure what "the font library is in gb2312 format" means, but if you are referring to the u8g2_fonts.c file, it is possible that the source file does not contain any Chinese characters. Therefore, encoding in utf-8 and gb2312 formats would be the same.

nnd,英语累死了

啊,你是国人啊,那用中文吧哈哈。我是用的b站甘草大佬的gb2312的库

@njuFerret
Copy link

额,这世界,还有谁关心gb2312???

@songzhishuo
Copy link
Author

界,还有谁关心gb2312??

为啥?我觉得2312很好用啊。

@njuFerret
Copy link

界,还有谁关心gb2312??

为啥?我觉得2312很好用啊。

gb2312是乱码的根源,当然,微软也是有锅要背的

@songzhishuo
Copy link
Author

songzhishuo commented Jun 8, 2023

大佬是国内维护u8g2的开发者吗?有没有比较全的u8g2的utf8的库。其次为啥u8g2官方没提供mui 相关的例程?是不好用吗? @njuFerret

@njuFerret
Copy link

不是什么大佬,mui例程有,arduino版本的,不过还不是很熟悉,正在看文档,写的很好,就是看得很累

@songzhishuo
Copy link
Author

不是什么大佬,mui例程有,arduino版本的,不过还不是很熟悉,正在看文档,写的很好,就是看得很累

大佬方便传递个邮箱什么的然后我加下你微信吗?

@njuFerret
Copy link

都这个时间了,你居然还在水?

@songzhishuo
Copy link
Author

都这个时间了,你居然还在水?

这不是遇到了大佬,所以激动的睡不着

@njuFerret
Copy link

都这个时间了,你居然还在水?

这不是遇到了大佬,所以激动的睡不着

闪....

@ziqian-L
Copy link

我遇到了相同的问题,相同的办法解决的。
果然,GB2312太难用了。
恨来自瓷器😡

@piogrammer
Copy link

piogrammer commented Jul 10, 2023

emmm...
这个鸡巴问题,很好解决呀
把windows的编码改为utf8不就好了,虽然有副作用.............

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants