Hello Oleg,
I have an issue with exporting data into a csv-file using Oracle spooling via sqlplus.
I'm using a "Windows Server 2019 Standard, Version 1809, 64-bit" System and Robotask 7.6.2.988. A batch-file is connecting to the database and running a sql-file, which is spooling data out of the database into a csv-file.
The contents of the files are:
start.bat
exit | sqlplus "<schema>/<password>@<database>" @"spool.sql"
spool.sql
set heading off
set feedback off
set linesize 250
set trimspool on
set pagesize 0
spool "c:\temp\test\out.csv"
select 'title'
from dual;
select 'xäÄßx'
from dual;
spool off
Starting start.bat manually via file-explorer gives me this result inside file out.csv:
title
xäÄßx
This is good.
Starting start.bat via a single Robotask action ("run program/open document") without using any parameters gives me this result inside file out.csv:
title
xä-îx
This is bad.
I'm assuming, Robotask does nothing but starting start.bat and therefore I don't expect any difference.
So, what can I do, to get the "good" result even using Robotask?
Thanks in advance.
Best regards
Special characters
Re: Special characters
Try to start your BAT file through system command processor CMD.EXE
Command line is:
In this case RoboTask launch 32-bit version of CMD.EXE from C:\Windows\SysWOW64
To start x64 native version use sysnative virtual folder
In this case RoboTask starts native x64 version of CMD from C:\Windows\System32
Command line is:
Code: Select all
cmd.exe /c start.bat
To start x64 native version use sysnative virtual folder
Code: Select all
c:\windows\sysnative\cmd.exe /c start.bat
Oleg Yershov
Re: Special characters
I tried this via Robotask:
Program: c:\windows\syswow64\cmd.exe
Parameters: /c start.bat
Folder: C:\Temp\test
=>Wrong result!
Program: c:\windows\system32\cmd.exe
Parameters: /c start.bat
Folder: C:\Temp\test
=>Wrong result!
If I start the batch-file via \syswow64\cmd.exe or \system32\cmd.exe from inside a command-box manually both works fine.
Program: c:\windows\syswow64\cmd.exe
Parameters: /c start.bat
Folder: C:\Temp\test
=>Wrong result!
Program: c:\windows\system32\cmd.exe
Parameters: /c start.bat
Folder: C:\Temp\test
=>Wrong result!
If I start the batch-file via \syswow64\cmd.exe or \system32\cmd.exe from inside a command-box manually both works fine.
Re: Special characters
This behavior is strange...
if you try to use system32, the system still starts CMD from syswow64.
SYNATIVE is virtual folder specially for 32-bit applications. (RoboTask is 32-bit application)
Try it please.
if you start from RoboTask you have to start CMD from sysnative folder (not from system32)Program: c:\windows\system32\cmd.exe
if you try to use system32, the system still starts CMD from syswow64.
SYNATIVE is virtual folder specially for 32-bit applications. (RoboTask is 32-bit application)
Try it please.
Oleg Yershov
Re: Special characters
OK, I tried, but still wrong characters are appearing:
- Attachments
-
- robo2.PNG (12.4 KiB) Viewed 13673 times
-
- robo1.PNG (22.06 KiB) Viewed 13673 times
Re: Special characters
Hello Oleg,
I deinstalled Robotask 7.6.2.988 and installed 6.7.0.907 (the version we did use before on the old server).
There was nothing else changed on the new Win2019 server.
Now we get the special characters in our output-files again.
My opinion now ist, that probably Robotask is causing the problem.
What do you think about that and do you may find the origin of the problem and perhaps going to solve it?
I've to find a quick solution due to being on vacation in december and my colleagues will need the right data in their output-files during that time.
Thank you.
I deinstalled Robotask 7.6.2.988 and installed 6.7.0.907 (the version we did use before on the old server).
There was nothing else changed on the new Win2019 server.
Now we get the special characters in our output-files again.
My opinion now ist, that probably Robotask is causing the problem.
What do you think about that and do you may find the origin of the problem and perhaps going to solve it?
I've to find a quick solution due to being on vacation in december and my colleagues will need the right data in their output-files during that time.
Thank you.
Re: Special characters
I'm sorry, I can't understand how RoboTask can break the output of SQL+.
The file out.csv has been created by SQL-Plus application. RoboTask only starts your batch file
Could you sent the out.csv file as-it-is to my email.
It would be great to have both variants: broken and good
The file out.csv has been created by SQL-Plus application. RoboTask only starts your batch file
Could you sent the out.csv file as-it-is to my email.
It would be great to have both variants: broken and good
Oleg Yershov
Re: Special characters
Hm-m...
maybe you need to put at 1-st line of your BAT file such string
this command sets the codepage 1252 (western) to active console session.
maybe you need to put at 1-st line of your BAT file such string
Code: Select all
chcp 1252
Oleg Yershov
Re: Special characters
In the time between I upgraded to the most recent version with installing some versions in between and now we are using 7.6.3.990 and it's working fine!
May be something went wrong during the first installation.
I hope it's definitely fixed now....
May be something went wrong during the first installation.
I hope it's definitely fixed now....