Special characters

Discuss RoboTask here
Post Reply
userXXX
Posts: 58
Joined: Wed Jun 11, 2014 8:45 am

Special characters

Post by userXXX »

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
Oleg
Site Admin
Posts: 3004
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Special characters

Post by Oleg »

Try to start your BAT file through system command processor CMD.EXE
Command line is:

Code: Select all

cmd.exe /c start.bat
In this case RoboTask launch 32-bit version of CMD.EXE from C:\Windows\SysWOW64

To start x64 native version use sysnative virtual folder

Code: Select all

c:\windows\sysnative\cmd.exe /c start.bat
In this case RoboTask starts native x64 version of CMD from C:\Windows\System32
Oleg Yershov
userXXX
Posts: 58
Joined: Wed Jun 11, 2014 8:45 am

Re: Special characters

Post by userXXX »

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.
Oleg
Site Admin
Posts: 3004
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Special characters

Post by Oleg »

This behavior is strange...
Program: c:\windows\system32\cmd.exe
if you start from RoboTask you have to start CMD from sysnative folder (not from system32)
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
userXXX
Posts: 58
Joined: Wed Jun 11, 2014 8:45 am

Re: Special characters

Post by userXXX »

OK, I tried, but still wrong characters are appearing:
Attachments
robo2.PNG
robo2.PNG (12.4 KiB) Viewed 11920 times
robo1.PNG
robo1.PNG (22.06 KiB) Viewed 11920 times
userXXX
Posts: 58
Joined: Wed Jun 11, 2014 8:45 am

Re: Special characters

Post by userXXX »

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.
Oleg
Site Admin
Posts: 3004
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Special characters

Post by Oleg »

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
Oleg Yershov
Oleg
Site Admin
Posts: 3004
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Special characters

Post by Oleg »

Hm-m...
maybe you need to put at 1-st line of your BAT file such string

Code: Select all

chcp 1252
this command sets the codepage 1252 (western) to active console session.
Oleg Yershov
userXXX
Posts: 58
Joined: Wed Jun 11, 2014 8:45 am

Re: Special characters

Post by userXXX »

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! :D
May be something went wrong during the first installation.

I hope it's definitely fixed now.... :roll:
Post Reply