[Migrated content. Thread originally posted on 10 May 2006]
Good Days,
In a printer-file, we are sending "-P Spooler Direct" like the printer nam but in this case, some characters like "?", "?" or "?" etc, dont print correctly, i mean, another characters appear. When we send only "-P Spooler" all works fine.
Someone can tell me why occurs this?
Thanks very much
This happens because when you use SPOOLER-DIRECT, you are bypassing the printer driver.
When printing under windows, the printer driver controls the setup of the printer, among other things it tells the printer what codepage to print.
When you bypass the driver, the printer does not get this information, that is, what codepage to print it, so it uses the standard codepage.
The standard codepage is usually one of the extended ascii codepages, most often 437 US English.
Whatever codepage it is, it seems obvious to me that this codepage is not for your local language.
Your solution to this is either to start using SPOOLER instead of SPOOLER-DIRECT or you will have to send an escape sequence to the printer at opening to set it to a particular codepage. A third alternative is of course also to change this in the setup of the printer.
The catch with the latter two alternatives is that it implies a lot of work for every installation. Escape sequences tend not to be portable, which is the wonderful thing about the Windows printer driver. You as a programmer deal with that one interface and leave the mess with the variety of printers to it.
I would suggest you consider using SPOOLER instead of SPOOLER-DIRECT, this will allow you the most portability in the windows world.