I am observing a difference between DBISQL vs DBISQLG when using an OUTPUT TO statement.
I have a simple .SQL script that uses 'OUTPUT TO' on a 'SELECT' statement (Pls see below).
This .SQL script when read/run from a simple .BAT batch file, with DBISQL, produces unreadable/gibberish characters for ASCII & HTML formats. (XML is OK).
When I change only the DBISQL to DBISQLG, the output is produced with correct characters in all three formats - ASCII, HTML, & XML !!
So, I would like to understand why the output from these two programs (DBISQL & DBISQLG) would differ!!??
My data/database has extended/accented characters.
Here are my .SQL & .BAT files:
I originally read that DBISQLG is just an alias for DBISQL and they should be the same. But on my machine, the file dates on both files are not identical to each other (i.e. they are off by a few seconds).
My Environment: I am having to use ASA 188.8.131.5272 on a Windows Embedded Standard 2009 OS.
My Data: Characters used are from Windows Code Page 1252 as below: à (Char 224), á (Char 225), á (Char 226), etc..
Any insights are welcome. Thank you in advance.
I believe the issue is that running the batch file is changing your codepage (charset) so when dbisql[g] is executed it believes that you want the output to be in different character sets.
For example, if you copy your text "à (Char 224), á (Char 225), á (Char 226)" and paste it on your command line like this:
and execute it you will see the output
so you got what you wanted. But if you create a batch file (say foo.bat) and put the same command into the file:
and then run foo.bat
then you may get something completely different. When I run foo.bat I get this:
The reason is that the batch file is executed using a different codepage (i.e. character set).
One solution is to explicit state the client charset that you want to use using the -c "...;charset=cp1252;..."
BTW: You were told correctly, dbisqlg.exe and dbisql.exe are identical in functionality. The only difference is that one is compiled/linked as a windows console application and the other is not.