完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我想在一个已经在APIC24F上工作的固件上介绍俄语。我使用了字体指南,但是找不到如何自动将一个西里尔字符转换成十六进制值,使字符串在字母表中表现得很好。最好的问候
以上来自于百度翻译 以下为原文 Hi, I'm trying to introduce Russian language on a firmware that is already working on a PIC24F. I used the font guide, but couldn't find how to automatically convert a cyrillic character into an hexadecimal value to have the string well represented in its alphabet. Any idea on how to convert it ? Best Regards |
|
相关推荐
6个回答
|
|
用俄语什么?一个LCD,UART或其他通信?Ruben
以上来自于百度翻译 以下为原文 Use Russian language on what? An LCD, UART or other communication? /Ruben |
|
|
|
|
|
|
|
在传统的MLA中,有一个图形资源转换器,它能够为字体文件中的任意字符集选择一个资源文件,以供选择的字体文件中可用的任何字符集或语言。A:图形资源转换器帮助。PDF在同一目录下。迈西尔
以上来自于百度翻译 以下为原文 In Legacy MLA, there is Graphics Resource Converter, that is able to make a resource file with font characters for a selection of Unicode characters for any character set or language that is available in the font file selected. In current MLA, it is in: .../ MLA/ framework/gfx/utilities/grc There is a: Graphics Resource Converter Help.pdf in the same directory. Mysil |
|
|
|
我们使用图形资源转换器来为我们的项目制作字体,包括俄语翻译。我们使用的方法是制作一个字体过滤器,这是一个要包含的字符列表。所以对于俄罗斯人,你制作文件,包括英语和俄语字符,然后让GRC转换那些。结果将是一个文件,包括英语和俄语字符。问题是使用您需要的字符来知道字符数组中的索引值。我们使用自定义固件从UTF8值转换为索引。我们还需要处理不同长度的字符值,因为英文字符是一个字节,俄语字符是2个字节。
以上来自于百度翻译 以下为原文 We use the graphics resource converter to make the fonts for our projects, including Russian translation. The way we use this is to make a font filter, which is a list of characters to be included. So for Russian you make file that includes English and Russian characters, then have the GRC convert those. The result will be a file that includes English and Russian characters. The problem is to use the characters you need to know the index value in the character array. We use custom firmware to convert from a UTF8 value to the index. We also need to handle character values of varying length since the English characters are one byte, and the Russian characters are 2 bytes. |
|
|
|
真正的俄语字符是65536字节宽。如果你不相信这一点,你可以去俄罗斯,并要求任何熊走在街上喝伏特加和玩巴拉莱卡。
以上来自于百度翻译 以下为原文 Bullsh¡t. The true Russian characters are 65536 bytes wide. If you do not believe this you can travel to Russia and ask any bear walking by the street drinking vodka and playing balalaika |
|
|
|
HI,有几种方法来解决字体/资源文件中的扩展字符集。A:16位宽字符代码,可以使用65536种不同字符,包括所有欧洲和俄罗斯语言,以及现代汉语、日语和韩语脚本,而不必处理。在Windows和其他一些系统中,这被称为WixChar类型,并且需要在C库打印格式化函数中的一些扩展:这些在XC32中是可用的:WPRINTF(const WcHaLaT**,…)FWPRINTF(μ*文件*,const WCalaT**,…)SWPRINTF(WCHARYTT,SIZEZT,const WCHARYTT,…在传统的MLA中,有一个宏用法,MulyByTeaar意味着使用16位字符。这是一个错误和错误命名,并且应该真正被更改为:UsHyWixChar。我不知道它是否已经在当前的MLA中被修正为PIC24.B:USESH多字节。CUAR应该保留为平均的可变宽度字符表示。Unicode UTF8使用1到3字节来表示任何Unicode字符。它定义为这样的方式,即美国和欧洲语言中的128个最常见的字符,与ASCII字符相同,所以C语言源。代码只需要1字节的字符。然后有字节代码,表示有更多字节来表示字符。查找解释UTF8如何编码的维基百科或Unicode文档。使用UTF8多字节字符表示,不需要特殊的HANDLIN。编译器中的所有异类字符代码只是编译器所看到的文本数据字节。在渲染文本显示或打印时,应用程序代码必须完成复杂的工作。然后,必须将Multibyte字符代码解码成指针/索引,以处理由图形存储的字体数据。资源转换器。存在库函数将UTF8多字节文本转换为宽字符的16位字符代码,这可能在寻址字体资源文件时更为方便。参见:MbStoWCS(…);和:MbToWC(WCHARGET**PWC,const char s,siZigt n);用XC16提供的离子真的像他们所想的那样工作。C:使用字体过滤器。这是为一个封闭的文本选择加上字符表示,这样所有实际出现的字符在0到255的范围内都有新的字符代码。这可能对一组菜单起作用。文本或其他固定用户界面工作。它可能在文本处理环境中不可用,在该文本处理环境中,一般文本从文件或其他外部源导入。迈西尔
以上来自于百度翻译 以下为原文 Hi, There are at several ways to address a extended character set in a font / resource file. A: 16 bit wide character codes, giving possibility to use 65536 different characters, including all European and Russian languages, and also modern Chinese, Japanese and Korean script, without having to handle extension codes. In Windows, and some other systems this is called widechar type, and need some extensions in C library print formatting functions: These are available in XC32 as: wprintf (const wchar_t *, ...) fwprintf(__File *, const wchar_t *, ...) swprintf (wchar_t *, size_t, const wchar_t *, ...) There is In Legacy MLA there is a macro USE_MULTIBYTECHAR that mean to use 16-bit characters. This is a mistake and misnaming, and should really be changed to: USE_WIDECHAR. I do not know if it have been corrected in current MLA for PIC24. B: USE_MULTIBYTECHAR should be reserved to mean Variable Width Character representation. Unicode UTF8 use between 1 and 3 bytes to represent any Unicode character. It is defined in such a way that the 128 most common characters in american and european languages, are the same as ASCII characters, so C language source code will need 1 byte characters only. Then there are byte codes that indicate that there are more bytes following to represent the character. Look up Wikipedia or Unicode documentation that explain how UTF8 is coded. Using UTF8 multibyte character representation, there is no need for special handling by the Compiler: All exotic character codes are just text data bytes as seen by the compiler. The tricky work have to be done by Application code when rendering text to Display or Print. Then Multibyte character codes must be decoded into pointers/indices to address Font data, stored by the Graphics Resource Converter. There exist library functions to translate UTF8 Multibyte text into wide character 16 bit character codes, that may be more convinient when addressing the Font resource file. See: mbstowcs (...); and: mbtowc(wchar_t *pwc, const char *s, size_t n); it is unclear to me, if the functions provided with XC16 really work as they are supposed to. C: Using Font Filter. This is scrambling the character representation for a closed selection of text, such that all characters that are actually present, are given new character codes within the range: 0 to 255. This may work for a set of menu texts, or other fixed user interface work. It probably isn't usable in a text processing environment where general text is imported from file or other external sources. Mysil |
|
|
|
只有小组成员才能发言,加入小组>>
5234 浏览 9 评论
2026 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3201 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
771浏览 1评论
659浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
588浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
670浏览 0评论
571浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-20 15:43 , Processed in 1.391955 second(s), Total 56, Slave 50 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号