C#: Cycle through encodings

后端 未结 6 1498
小蘑菇
小蘑菇 2020-12-16 05:42

I am reading files in various formats and languages and I am currently using a small encoding library to take attempt to detect the proper encoding (http://www.codeproject.c

6条回答
  •  无人及你
    2020-12-16 06:28

    You have to keep the original data as a byte array or MemoryStream you can then translate to the new encoding, once you already converted your data to a string you can't reliably return to the original representation.

提交回复
热议问题