zoukankan      html  css  js  c++  java
  • Keil BUG 导致读字库时,无法显示某些汉字解决办法

    原因在于:KEIL C51 的一个汉字BUG,keil c51在编译的时候会将0xfd的字符(有些汉字含该字符的内码)过滤,


    最佳解决方案:打补丁,用  晓奇工作室出的补丁 cckeilvxx.exe

    http://www.pc6.com/softview/SoftView_67694.html


    --------------------------------------------------------------------------------------------------------------------------------------------------------------------

    下面来自网友:http://blog.sina.com.cn/s/blog_6101ed5f0101g6ee.html


    1.官方解释


    GENERAL: COMPILER IGNORES 0XFD, 0XFE, 0XFF VALUES IN STRINGS
    Information in this article applies to:


    C166 Compiler All Versions
    Cx51 Compiler All Versions
    C251 Compiler All Versions
    QUESTION


    I have a problem with the interpretation of Russian strings in the Keil C51 compiler. Some Russian characters are using the encoding 0xFD. It looks like this encoding is ignored by the compiler and is not included in the program code.


    Example:


    code char RussianString[] = "??? ????";
    Why does this problem exist and how can I avoid this behavior?


    ANSWER


    The character encodings 0xFD, 0xFE, and 0xFF are used internally by the C compiler. The ANSI standard only requires support for ASCII characters in the range 0x00 - 0x7F.


    You may insert these characters by using HEX encodings in the string as follows:


    code char RussianString[] = "My Text" "xFD";
    A simple text replacement which replaces all 0xFD characters with the string '" "xFD' should do the job.


    即遇到无法显示字符时在其后加xFD


    如 :unsigned char code s[]="数学"; 改为 unsigned char code s[]="数xFD学"; 即可正常显示


    2.修改keil编译器


    用WinHex或C32Asm等HEX编辑工具修改C51BIN中的C51.exe和A51.exe


    十六进制搜索 80FBFD 改为 80FBFF 即可。


    不过不建议使用这种方法,修改编译器后可能会产生某些意想不到的错误。

  • 相关阅读:
    visual studio 项目中使用EF创建的数据库,后续更新数据库操作(生产已经部署,不能删除数据库重新创建)
    使用Visual Studio 开发SharePoint项目时的快捷键
    JQuery预览图片
    Sharepoint 编辑WebPart时,WebPart属性为灰色不可用
    iWS工作流加载顺序
    dll备份注意事项
    Repeater 横向显示数据
    MDN开发者网络
    hdu 1010:Tempter of the Bone(DFS + 奇偶剪枝)
    ytu 2463:给小鼠补充代码(DFS 深度优先搜索)
  • 原文地址:https://www.cnblogs.com/alan666/p/8312098.html
Copyright © 2011-2022 走看看