class function TMxtTmProto.EncodeMsgData(const rawData: string): string;
var
  i:Integer;
  len:Integer;
begin
  Result := '';
  len := length(rawData);
  for i:=1 to len do
  begin
    if (Byte(rawData[i]) = $01) or (Byte(rawData[i]) = $04) or
      (Byte(rawData[i]) = $10) or (Byte(rawData[i]) = $11) or
      (Byte(rawData[i]) = $13) then
    begin
      Result := Result + Chr($10);
      Result := Result + Chr(Byte(rawData[i]) + $20);
    end
    else
      Result := Result + RawData[i];
  end;
end;