i’m writing some perl scripts to convert old sgml in western format to xml files in utf-8 format
some of my perl scripts need to be in western so that when i open the western encoded file, i can do search and replace on characters.
for example fancy quotes
i’ll convert those quotes to something like ’ or ”
some of my perl scripts need to have utf-8 characters in the scripts and then i’ll search and replace ” with the actual fancy quotes.
my problem is that if i open a pl file that is western encoded and then edit and save it, it saves it as utf-8
i’d like for the program to leave the file encoding alone so that some pl files stay western and some stay utf-8
is there a way to do that?