Page 2 of 2

Re: Incorrect Font Display

Posted: Fri Dec 06, 2024 1:52 am
by dutch
Dear Surasak,

I test with FWH2304 without problem, do not define FW_SetUnicode() in your code. That's all, if you use ANSI.
Image

testget2.prg

Code: Select all | Expand

#Include "FiveWin.Ch"

Function Main()
   Local oDlg
   Local oGet, oSay, oFont
   local cVar := space( 10 )

   DEFINE FONT oFont NAME 'Tahoma' SIZE 0, -16

   DEFINE DIALOG oDlg from 0,0 to 400,400 pixel
   @  5,15 SAY oSay PROMPT chr(202)+chr(161) SIZE 40, 12 PIXEL OF oDlg FONT oFont
   @ 25,15 get oGet var cVar picture "@!"  bitmap "..\bitmaps\chkyes.bmp" action( msginfo( "action" ) );
   size 120,12 of oDlg pixel
   oGet:lAdjustBtn := .t.  

   ACTIVATE DIALOG oDlg 
 
 return nil
Surasak wrote:Dear nageswaragunupudi,

My ANSI Program work fine on FW17 and older, Just found this problem on FW24 with BCC7.70
In THAI character TIS-620 and Window 874 character in my sample cannot combine

Please see the picture at link below:

http://www.asic-net.com/temp/Font-1.jpg
http://www.asic-net.com/temp/Font-2.jpg

Re: Incorrect Font Display

Posted: Fri Dec 06, 2024 2:35 am
by dutch
Dear Master Rao,

This issue is FW_SetUnicode(.F.) is not the same behavier as ANSI (do not declare FW_SetUnicode).
nageswaragunupudi wrote:
K.Surasak,
What is chr(202)+chr(161) represent for (which character in Thai) ?
Thai characters 202,161 are
ส, ก
Thai language in (TIS620) ascii table has not 2 bytes character. All character is represent 1 ascii code.
What is TIS620? Can you please enlighten me?
To the extent I know the Thai codepage in Windows is 874.
And yes, there are no 2 bytes characters.

Single byte character 202 is and
single byte character 161 is .
So the combination of these two characters should be displayed as สก
But the FWH version you have is displaying a totally different character. ʡ
This is because FWH is not recognizing สก as two individual single byte characters but as a 2-byte UTF8 character ʡ

We are in the process of resolving the issue, with kind support from both of you.