Tag: extended ascii

将两个ascii字符转换为它们的“对应”一个字符扩展ascii表示

问题:我有两个来自外部系统的固定宽度字符串。 第一个包含基本字符(如az),第二个(MAY)包含要附加到第一个字符串以创建实际字符的变音符号。 string asciibase = “Dutch has funny chars: a,e,u”; string diacrits = ” ‘ \” \””; //no clue what to do string result = “Dutch has funny chars: á,ë,ü”; 我可以写一个大规模的搜索并替换所有字符+不同的变音符号,但希望有更优雅的东西。 有人知道如何解决这个问题? 尝试计算小数值,使用string.Normalize(c#),但没有结果。 谷歌也没有真正想出办法。

如何在Windows Forms C#中将扩展ASCII转换为十进制?

我正在写一个Windows应用程序。 在将扩展ASCII [128-256]转换为十进制等效时遇到问题。 当我从jar文件中收到扩展的ASCII例如“Œ”时,它会进入C#应用程序,如下所示: 。 我可以知道如何将其转换为十进制等效值[ie] 140。 string textToConvert = “Œ”; Encoding iso8859 = Encoding.GetEncoding(“iso-8859-1”); Encoding unicode = Encoding.Unicode; byte[] srcTextBytes = iso8859.GetBytes(textToConvert); byte[] destTextBytes = Encoding.Convert(iso8859,unicode, srcTextBytes); char[] destChars = new char[unicode.GetCharCount(destTextBytes, 0, destTextBytes.Length)]; unicode.GetChars(destTextBytes, 0, destTextBytes.Length, destChars, 0); System.String szchar = new System.String(destChars); MessageBox.Show(szchar); 请帮我。 我该怎么办?

Console.Write() – 显示扩展的ascii字符?

我能够正确显示标准的ASCII符号(最多127个),如“heart”,“note”,你知道我的意思。 我还想展示一些我可以用来绘制墙壁的东西(比如U0205),但是它不起作用..它可以工作,但它看起来像“?”。 我怎么能显示它们? 谢谢。

如何将扩展的ascii转换为System.String?

例如:“½”或ASCII DEC 189.当我从文本文件中读取字节时,byte []包含有效值,在本例中为189。 转换为Unicode会导致Unicode替换字符65533。 UnicodeEncoding.Unicode.GetString(b)中; 转换为ASCII结果为63或“?” ASCIIEncoding.ASCII.GetString(b)中; 如果这不可能,处理这些数据的最佳方法是什么? 我希望能够执行像Replace()这样的字符串函数。