gpt4 book ai didi

c - gnome-terminal 支持 DOS 代码页吗?

转载 作者:行者123 更新时间:2023-12-03 03:29:42 25 4
gpt4 key购买 nike

在我的 C 程序中,我必须将 unicode 制框字符交换为 DOS 代码页 437 的转义字符,才能使其在 Windows 命令提示符下工作。在本地编译 Linux 程序时,是否可以更改 gnome-terminal 的代码页以正确显示这些字符?

谢谢。

最佳答案

来自https://nethackwiki.com/wiki/IBMgraphics

The current gnome-terminal does not have a setting for code page 437, but it does support other code pages that are equivalent for NetHack's purposes, such as 862 (Hebrew).

To set code page 862 on gnome-terminal:

  • Select Terminal->Set Character Encoding->Add or Remove.
  • In the pane on the left, select the line with description Hebrew and encoding IBM862.
  • Click the right-pointing arrow between the two panes.
  • Click Close.

The above steps only need to be done once for the lifetime of the Gnome installation. Once done, it is sufficient to:

  • Select Terminal, Set Character Encoding, and then Hebrew (IBM862).

It should be noted that the current default gnome-terminal font in Ubuntu Jaunty fully supports DECgraphics as long as eight_bit_tty is set to false.

关于c - gnome-terminal 支持 DOS 代码页吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5509829/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com