Hi
I have a text file in Unicode format and i want to change it into ANSI.
Give me some ideas.
Thanks
Darma
Unicode to ANSI
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted May 22, 2012, 6:43 AM EDT
Try changing the second line to:
File.WriteAllText(filePath, text, Encoding.Default);
which should give you a file encoded with the current ANSI code page.
VulpesRank #55 · 29.2K reputationPosted May 22, 2012, 6:20 AM EDT
darma tejaRank #3,199 · 449 reputationPosted May 22, 2012, 6:37 AM EDT
Thanks for the fast reply!!!
I wanted to change it to ANSI not ASCII.
Darma