Jump to content
Registration disabled at the moment Read more... ×
Tommi Prami

have anyone made tool to convert Delphi files from Ansi to UTF-8

Recommended Posts

Not super complicated app, but if someone has that ready would help.

I think someone talked about it, but have no clue on which thread.

 

-Tee-

Share this post


Link to post

I wrote a small script ConvertToUTF8.sh to convert all * .pas and * .dpr files from ANSI to UTF-8, which writes the results of its work to a file (conversion is performed for all files inside the current folder and its subdirectories). You can first run FindNotUTF8.sh to find all files in a non-UTF-8 encoding (the results of the script are also output to a file).

Share this post


Link to post

ConvertToUTF8.7z

 

Using the ZIP2 component (but unit can be renamed to Zip to use the Delphi default) for creating backup copies. Finished 3000+ files in 90 seconds in our project at work.

It checks for BOM existence; so if you have actual UTF8 files without BOM it can cause issues.

  • Thanks 1

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×