If your text (HTML text) has UTF8 coding you need read it as UTF8 text. Look at my examples below
Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
Also you can simply copy task text and paste it into the task list.
1-st example
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|444033236
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DisableOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task1464"
Hide=INTEGER|0
ID=INTEGER|-439059366
LogOnAsUser=INTEGER|1
Name=STRING|"chinese text (1)"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RestrictRESTAPIAccess=INTEGER|0
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
StepPause=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""fileName"" with value ""C:\temp\Test.txt"""
Params=FOLDER
[Actions\Action1\Params]
_rt_variables_produced=STRING|"fileName"
expand=STRING|"0"
linecount=STRING|"1"
varname=STRING|"fileName"
varvalue=STRING|"C:\temp\Test.txt"
[Actions\Action2]
ActionID=STRING|"A_DIALOG_SHOWTEXT"
Enabled=INTEGER|-1
Name=STRING|"Show Text"
Params=FOLDER
[Actions\Action2\Params]
autoclose=STRING|"0"
fromfile=STRING|"1"
line00000000=STRING|"{TextFileUTF8({fileName})}"
linecount=STRING|"1"
timeout=STRING|"10"
2-nd example
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|444033236
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DisableOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task1465"
Hide=INTEGER|0
ID=INTEGER|1907355058
LogOnAsUser=INTEGER|1
Name=STRING|"chinese text (2)"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RestrictRESTAPIAccess=INTEGER|0
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
StepPause=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""fileName"" with value ""C:\temp\Test.txt"""
Params=FOLDER
[Actions\Action1\Params]
_rt_variables_produced=STRING|"fileName"
expand=STRING|"0"
linecount=STRING|"1"
varname=STRING|"fileName"
varvalue=STRING|"C:\temp\Test.txt"
[Actions\Action2]
ActionID=STRING|"A_READ_TXTFILE"
Enabled=INTEGER|-1
Name=STRING|"Read Text File ""{fileName}"" (65001)"
Params=FOLDER
[Actions\Action2\Params]
_rt_variables_produced=STRING|"Text"
codepage=STRING|"65001"
filename=STRING|"{fileName}"
replacenull=STRING|"1"
varname=STRING|"Text"
[Actions\Action3]
ActionID=STRING|"A_DIALOG_SHOWTEXT"
Enabled=INTEGER|-1
Name=STRING|"Show Text"
Params=FOLDER
[Actions\Action3\Params]
autoclose=STRING|"0"
fromfile=STRING|"1"
line00000000=STRING|"{Text}"
linecount=STRING|"1"
timeout=STRING|"10"
The following test text file opens normally in VSCode and Notepad.exe...
Notepad and VSCode detects coding automatically. RoboTask reads file as it is.
Generally UTF8 text should have a UTF8 signature - byte order mask (BOM), but your HTML text does not. Therefore, RoboTask assumes that it is plain text.
The problem is related to BOM existence. You can test is in attached example.
In the ZIP simple task file and two text files
with BOM and
without BOM