[OS_Process->SetEncoding] sets the character set which is used for the automatic conversion of data passed to the native process using [OS_Process->Write] and read from the process using [OS_Process->ReadString] or [OS_Process->ReadLine]. By default the encoding is set to UTF-8 if no character set has been set. If a byte stream is passed to [OS_Process->Write] then no encoding is applied and [OS_Process->Read] can be used to read the result of the native process as a raw byte stream.
local(myProcess = OS_Process('/bin/cat')) #myProcess->SetEncoding('iso-8859-1') #myProcess->Write('This is a test\n') #myProcess->CloseWrite encode_html(#myProcess->ReadString) #myProcess->Close
No examples found
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.