Encoding.GetEncoding“西里尔”在.NET中制作所有文本问号

问题描述

为什么使用以下方法将txt ?????? ???????? ?????????? ??????? ???? ??? ????转换为txt?

???????????? ???????????????? ????????????????????? ?????????????? ????????? ?????? ?????????

我相信以前没有发生过,但我只是看到了。我正在使用.NET 4.8。

 public static string RemoveAccent(this string txt)

    {
        if(txt == null)
        return txt;

        byte[] bytes = Encoding.GetEncoding("Cyrillic").GetBytes(txt);
        return Encoding.ASCII.GetString(bytes);
    }

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)