开发者

UTF-8 decode from one text file to another

开发者 https://www.devze.com 2023-02-14 14:08 出处:网络
I have a text file (in real it is a *.cs file) which contains a strings like this if (buffer.Substring(len - 2, len).Equals(\"\\u00e1\\u010d\") || // -áč

I have a text file (in real it is a *.cs file) which contains a strings like this

if (buffer.Substring(len - 2, len).Equals("\u00e1\u010d") || // -áč
    buffer.Substring(len - 2, len).Equals("a\u010d") || //-ač
    buffer.Substring(len - 2, len).Equals("\u00e1n") || //-án
    buffe开发者_JAVA技巧r.Substring(len - 2, len).Equals("\u00e1\u0159") || //-ář

I want tot copy the file to a new with changing the unicode sequences

\u00e1\u010d

to the symbols

-áč

so finally I want to get the file with the next strings

if (buffer.Substring(len - 2, len).Equals("áč") || // -áč
    buffer.Substring(len - 2, len).Equals("ač") || //-ač
    buffer.Substring(len - 2, len).Equals("án") || //-án
    buffer.Substring(len - 2, len).Equals("ář") || //-ář

can anybody help me with this problem, please?

0

精彩评论

暂无评论...
验证码 换一张
取 消