Replacing characters in C# (ascii)

前端 未结 7 920
挽巷
挽巷 2020-12-05 08:26

I got a file with characters like these: à, è, ì, ò, ù - À. What i need to do is replace those characters with normal characters eg: à = a, è = e and so on..... This is my c

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-05 09:06

    Sounds like what you want to do is convert Extended ASCII (eight-bit) to ASCII (seven-bit) - so searching for that might help.

    I've seen libraries to handle this in other languages but have never had to do it in C#, this looks like it might be somewhat enlightening though:

    Convert two ascii characters to their 'corresponding' one character extended ascii representation

提交回复
热议问题