简体   繁体   English

日文字符显示? 标志

[英]Japanese characters showing ? sign

I have a winform application with the use of Segoe UI font. 我有一个使用Segoe UI字体的winform应用程序。 In Windows 10, Japanese character are displayed correctly. 在Windows 10中,正确显示日语字符。 But, Windows 7 is displaying the characters as ? 但是,Windows 7将字符显示为? sign. 标志。 What is the cause of this problem and how can I solve this issue? 导致此问题的原因是什么?如何解决此问题?

The reason is that the Segoe UI font is not preinstalled (see edit below) on Windows 7 so it probably falls back to a different font which might not support Japanese character set. 原因是在Windows 7上没有预装 Segoe UI字体(请参阅下面的编辑),因此它可能会回退到可能不支持日语字符集的其他字体。

You have two (three) options: 您有两个(三个)选项:

  • Use a different font which is supported on both Windows 10 and Windows 7 使用Windows 10和Windows 7上支持的其他字体
  • Check for the system version and change the font at runtime 检查系统版本并在运行时更改字体
  • (not use Windows 7 :-) ) (不使用Windows 7 :-))

Edit 编辑

It seems I was mistaken - Segoe UI actually is a part of Windows 7 , it was just not used as the default font for the Classic theme (there was the default Tahoma), only for Aero. 似乎我错了 - Segoe UI 实际上是Windows 7的一部分 ,它只是没有被用作经典主题的默认字体(有默认的Tahoma),仅用于Aero。

In that case you probably need to install the Japanese language pack to enable japanese characters on Windows 7. 在这种情况下,您可能需要安装日语语言包才能在Windows 7上启用日语字符。

Just go to the Region in Control Panel, In Administrative Tab, Change system locale to Japanese. 只需转到“控制面板”中的“区域”,在“管理”选项卡中,将系统区域设置更改为日语。

And Restart 并重启

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM