无法在"C"字样中打印欧元符号程序 [英] unable to print euro symbol in a "C" program

查看:66
本文介绍了无法在"C"字样中打印欧元符号程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法打印欧元符号.我正在使用的程序如下.

I am unable to print the euro symbol. The program I am using is below.

我将字符集设置为代码页1250 0x80代表欧元符号.

I have set the character set to codepage 1250 which has 0x80 standing for the euro symbol.

程序
=======

Program
=======

#include <stdio.h>
#include <locale.h>

int main()
{
    printf("Current locale is: %s\n", setlocale (LC_ALL, ".1250"));
    printf("Euro character: %c\n", 0x80);
    getchar();
    return 0;
}

输出
======
当前语言环境是:English_India.1250
欧元字符:?

其他详细信息
============
操作系统:Windows Vista
编译器:vc ++ 2008 Express Edition

Output
======
Current locale is: English_India.1250
Euro character: ?

Other details
=============
OS: Windows Vista
Compiler: vc++ 2008 express edition

推荐答案

阅读: http://www.columbia.edu/~em36/wpdos/eurodos.html

有一些部分可以为您提供很多帮助:

There are sections, which could help you a lot:

  • 在Windows NT,2000或XP的全屏DOS和命令控制台中显示欧元符号
  • 在DOS和Windows 2000和XP中的命令控制台窗口中显示欧元符号(对TrueType字体的内置支持)
  • 在DOS和Windows 2000和XP中的命令控制台中显示欧元(位图和TrueType字体)

这篇关于无法在"C"字样中打印欧元符号程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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