UI中的特殊字符显示 [英] Special character display in UI

查看:130
本文介绍了UI中的特殊字符显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个特定字符的应用程序(C#),如科学符号(μo)。在Oracle DB存储中正确。此应用程序涉及使用DataAdapter,OLEDB连接(oracle 11g)和DataSet。当我在UI中显示数据时。应用程序显示æo(æo),而不是显示正确的字符。在此先感谢

I am writing an application(C#) for a specific Character like science symbol(μo).In Oracle DB store properly. This application involves using DataAdapter, OLEDB Connection (oracle 11g)and the DataSet. when i am displaying data in UI. Instead of displaying the correct characters the application displays æo ("æo"). Thanks in advance

推荐答案





这是一个明显的字符编码问题。



如何解决它:更改角色所在的AppDomain文化。 ref

http: //msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.defaultthreadcurrentuiculture(v=vs.110).aspx [ ^ ]



但如果你想保持相同的文化,但仍想显示这些字符,那么更改编码ref: http://msdn.microsoft.com/en-us/library/ms404377(v = vs.110).aspx [ ^ ]



选择所需的编码。



如何使用编码: http://stackoverflow.com/questions/5864272/understanding-text-encoding-in-net [ ^ ]
Hi,

Its a clear problem of character encoding.

how to solve it : change the AppDomain culture to which the character exists. ref
http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.defaultthreadcurrentuiculture(v=vs.110).aspx[^]

but if you want to stay in same culture but still want to show those character then change the encoding ref : http://msdn.microsoft.com/en-us/library/ms404377(v=vs.110).aspx[^]

Chose your required encoding.

How to use encoding : http://stackoverflow.com/questions/5864272/understanding-text-encoding-in-net[^]


将webclient编码设置为UTF8。



client.Encoding = System.Text.Encoding.UTF8;





请参考这个链接 [< a href =http://stackoverflow.com/questions/923876/why-are-my-chinese-characters-not-displayed-correctly-in-c-sharp-stringtarget =_ blanktitle =新窗口> ^ ]







快乐编码:)
Set the webclient encoding to UTF8.

client.Encoding = System.Text.Encoding.UTF8;


Please refer this link[^] too



Happy Coding :)


这篇关于UI中的特殊字符显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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