Page 1 of 1

DCPRINT extended ASCII char

Posted: Sat Apr 15, 2017 4:48 pm
by alepap
I need to print extended ascii char using DCPRINT in Courier New font.

When I send the char directly to the HP printer, this is what I get
Image

When I use DCPRINT with the printer driver, this is what I get.
Image

This as to do with ANSI and ASCII EXTENDED.
I send the caraters in the CHR(218) CHR(196) 194 191 179 195 197 180 192 193 217
in my print function.

These special characters that creates a box, the are replaced by + and - like this +-------+ instead of a nice line.

Is there a solution for this?

Best Regards

AP

Re: DCPRINT extended ASCII char

Posted: Sat Apr 15, 2017 5:24 pm
by rdonnay
I tried setting the charset to ANSI but that doesn't work.

Same problem when putting this characters on the screen, except for in a CRT window.

There must be an answer but I'm not sure what to suggest.

Re: DCPRINT extended ASCII char

Posted: Sat Apr 15, 2017 6:59 pm
by alepap
I did not find any solution for this.

So I´m using @ DCPRINT BOX and @ DCPRINT LINE

and it does the job.
So bye bye line mode and this is PAGE MODE.

CHOO CHOO !

Re: DCPRINT extended ASCII char

Posted: Sun Apr 16, 2017 9:44 am
by Victorio
Hi,
I have a similar problem, where i want print text reports which are in two codepages. Older than 2001 year are in OEM, and new in ANSI. In both are used characters for lines, columns. I use TXT viewer, which automatically swith to OEM or ANSI where detected text rows in code CP852 or Windows 1250. It causes than some reports show in OEM and some in ANSI setting.
But special characters do not show and print correct in both codings. Because only can change characters "-" with"_" then line is fuller
as here
-------
_____

I do not know, if it is possible changing OEM/ANSI in one print report, if yes, then is possible print this characters good.
Try switch OEM/ANSI when print report, what happens

But I do not want go this way, I mean modify to DCPRINT LINE, BOX...
but in my event I have many reports and big reports accumulated from year 1994 n then I must converting it.

Re: DCPRINT extended ASCII char

Posted: Sun Apr 16, 2017 10:28 am
by Auge_Ohr
alepap wrote:I need to print extended ascii char using DCPRINT in Courier New font.
you have to use a ASCI Font or Unicode to print ASCI > 128
you also have to set right Codepage using Unicode.

Code: Select all

[FONT <ocFont> [CODEPAGE <nCodePage>]]                ;
Victorio wrote:Older than 2001 year are in OEM, and new in ANSI.
so you have to use 2 (or more) Set of Fonts.

i use this technique to show/print Chinese Sign togther with German/English
DbBrowse_chinese_OEM.JPG
DbBrowse_chinese_OEM.JPG (158.39 KiB) Viewed 17619 times