我正在使用 GPS 进行编程。但我不能在代码中使用 unicode 字符。我在首选项中将字符集设置为 UTF-8。但我仍然无法在代码中输入 unicode 字符作为注释。谁能告诉我如何在源代码中使用 unicode 字符?我将非常感谢您的帮助。谢谢!
太阳
["03C0"] 如何匹配附件 P 中 <Ada Reference Manual> 的语法?
也许这个问题和答案可以回答你的问题。
你的问题是什么?
1. Can not type in the unicode character.
2. Can copy an unicode character but can not paste in GPS.
3. Can type or paste in GPS, but can not save.
4. Can type or paste in GPS and can save, but can not compile.
我猜你的问题是第 4 号,然后参考我之前的帖子,如上链接。您需要使用“gnatmake -gnatW8 Hello.adb”进行编译。
转到构建 | 设置 | 目标 | 检查语法在底部的命令字段中插入 -gnatW8,例如: %gnatmake -q -gnatW8 -c -gnats -u %eL -P%PP %X %fp
如果需要,检查语义也是如此。
如果您只是在编辑字段中获得一个框,则需要使用不同的字体进行 GUI 和编辑。DejaVu是一个很好的,因为它包含几乎所有的 unicode 字符。
设置它们取决于您的操作系统。