Page 1 of 1

xbpMle and ANSI

Posted: Mon Nov 20, 2017 11:53 am
by jdsoft
Hello,
I try to display ANSI text in a xbpMle.
Unfortunaly characters are displayed incorrect.

SET CHARSET TO ANSI

Below the text and the Hex presentation of the data.

T™L MF120 (54D64C204D46313230)
Notice the second character #D6 (ASCII 214)
This shoud be Ö, but shows "TM" in superscript.
What is my mistake?

Re: xbpMle and ANSI

Posted: Mon Nov 20, 2017 12:43 pm
by Auge_Ohr
have try ..\SOURCE\samples\basics\DRAGDROP\DROP.EXE with TXT Files create by Notepad and can't confirm :naughty:

only € Sign seem wrong when using

Code: Select all

   oMLE:SetFontCompoundName( "10.Courier" )
MLE_ANSI.jpg
MLE_ANSI.jpg (244.52 KiB) Viewed 8557 times

Re: xbpMle and ANSI

Posted: Mon Nov 20, 2017 1:11 pm
by rdonnay
I entered the following into the command window in XDOT.EXE:

Code: Select all

SET CHARSET TO ANSI

c := HexToStr('54D64C204D46313230')

@ 0,0 dcmultiline c size 300,300 pixel font '12.Arial'

dcread gui fit
Below is the result:
Capture.JPG
Capture.JPG (15.86 KiB) Viewed 8555 times

Re: xbpMle and ANSI

Posted: Mon Nov 20, 2017 1:44 pm
by jdsoft
Hello Roger, Jimmy,

Thank you for the help.
I also made a simple app with just a DCMULTILINE. That worked as expected.

Eventualy, I managed to locate the problem.
I turned out, i called an obsolete ConvToAnsiCp() somewhere deep in my logging routine.
And the string was already Ansi. :whistle: :whistle: