Delphi/C# reencode textfiles: some links as I thought I published sources, but didn’t
Posted by jpluimers on 2026/06/30
A long time ago (likely around 2009) I remember writing some code to re-encode text files in both Delphi and C#.
Somehow I thought I had published both, but I could only find parts of the C# code back in .NET/C# – converting UTF8 to ASCII (yes, you can loose information with this) using System.Text.Encoding.
So here are some links just in case I ever want to reproduce it in Delphi too (and a reminder to always perform this using TStream derivatives, never use TStrings or derivatives like TStringList for this):
- [Wayback/Archive] delphi reencode text – Google Search
- [Wayback/Archive] delphi “tencoding” tstrings site:delphipraxis.net – Recherche Google
- [Wayback/Archive] Delphi – TStringList Save/Load to stream encoding – Stack Overflow
- [Wayback/Archive] What is wrong with TStringList – RTL and Delphi Object Pascal – Delphi-PRAXiS [en]
- [Wayback/Archive] delphi – Buffered files (for faster disk access) – Stack Overflow
- [Wayback/Archive] SysUtils, AnsiString – VCL – Delphi-PRAXiS [en]
- [Wayback/Archive] Making method with default encoding – RTL and Delphi Object Pascal – Delphi-PRAXiS [en]
–jeroen






Leave a comment