在扩展ASCII code显示字符(Ubuntu的) [英] Showing characters in extended ASCII code (Ubuntu)

查看:205
本文介绍了在扩展ASCII code显示字符(Ubuntu的)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要打印的ASCII字符的一部分延伸,即是这样的:

I need to print characters part of ASCII extended, namely something like:

char p = 219; // a rectangle   
printf("%c\n", p);

然而,在外壳不显示正确的字符..我能做些什么来看看矩形?

However, in the shell it does not show the proper character .. what can i do to see the rectangle?

感谢您

推荐答案

您必须使用支持ASCII扩展虚拟终端。在Ubuntu默认的终端是Gnome终端。你将不得不<一个href=\"http://library.gnome.org/users/gnome-terminal/stable/gnome-terminal-usage.html.en#gnome-terminal-encoding\"相对=nofollow>在GNOME终端的字符编码​​从UTF-8更改为ISO-8859-2或使用其他终端。 的Konsole 获得实例。

You will have to use a virtual terminal that supports extended ASCII. The default terminal in Ubuntu is gnome-terminal. You will have to change the character encoding in gnome-terminal from UTF-8 to ISO-8859-2 or use another terminal. Konsole for instance.

这篇关于在扩展ASCII code显示字符(Ubuntu的)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆