LassoScript Utility
Basics Browse Detail


Tag Link [OS_Process->SetEncoding] Category OS Process
Type Member Source Available Yes
Support Preferred Version 8.5
Change New Data Source Any
Output Type None Security None
Implementation Sets Lasso 8.5


[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.


Var: 'myProcess' = (OS_Process: '/bin/cat');
$myProcess->(SetEncoding: 'iso-8859-1');
$myProcess->(Write: 'This is a test\n');
encode_html: $myProcess->ReadString;


Required Parameters
Character Set The character set which should be used to automatically translate strings passed to [OS_Process->Write] and read from [OS_Process->ReadString].


See the Lasso 8 Language Guide for examples of how to use this tag.