I have written a code in Tcl which starts by getting the file My_Text_File.txt into it:
set myfile [open My_Text_File.txt]
set file_data [read $myfile]
The file My_Text_File.txt is encoded in UTF-8. But this file must be encoded in ISO 8859-15 (also referred to as Latin-9). Is there a way to extend a Tcl code in a way that it changes a UTF-8 encoded text file to an ISO 8859-15 encoded one?
I would like to emphasize that the change from UTF-8 to ISO 8859-15 must be done inside the Tcl code.
Thanks in advance!