Reading and writing files with encode

Using the encode inspectors, you can also read from and write to files, having different encoding.

The following example shows an action that reads the first line of a file having Windows-1253 (Greek) encoding, and writes it into a file having Windows-1252 (English) encoding:

delete "{(client folder of current site as string) & "/__appendfile"}"
action uses file encoding Windows-1253
appendfile 
{
line 1 of file "/tmp/Greek.txt" of encoding "Windows-1253"
}
delete "/tmp/encode.txt"
move __appendfile /tmp/encode.txt