Use BBedit for batch encoding conversion

113 views
Skip to first unread message

G. Antoine

unread,
Mar 27, 2025, 1:51:09 PM3/27/25
to BBEdit Talk
Hi all,

I have a bunch of (LaTeX) files that are encoded with mac-roman which I would like to convert to UFT8. I tried iconv (iconv -f MACROMAN -t UTF-8 ...) which is not working properly, but working with BBEdit does the job fine (open file, change encoding at the bottom of the window, save).

Now I would like to automate the procedure because I have dozens of such files. Can I do that, using AppleScript or some other method?

Thanks !

Rich Siegel

unread,
Mar 27, 2025, 2:16:46 PM3/27/25
to BBEdit Talk
This can be done using a Text Factory, with a single "Change Text Encoding" step.

Enjoy,

R.


--
Rich Siegel Bare Bones Software, Inc.
<sie...@barebones.com> <https://www.barebones.com/>

Someday I'll look back on all this and laugh... until they sedate me.

GP

unread,
Mar 27, 2025, 7:09:48 PM3/27/25
to BBEdit Talk
Expanding upon Rich's Text Factory answer...

For automation, place the created text factory in BBEdit's Scripts folder. When you run that script from the Scripts Pallet window, you'll have multiple ways of choosing files and whole folders of files that the text filter will be applied to when you run the filter.

G. Antoine

unread,
Apr 1, 2025, 9:31:19 AM4/1/25
to BBEdit Talk
That would be a good reason to get the full licence
Reply all
Reply to author
Forward
0 new messages