Incorrect Font Display
Incorrect Font Display
I just update my program to FW24.09 (BCC7.70) , I found the Font display incorrect when I enter some of 2 THAI character font for example chr(202)+chr(161) , chr(203)+chr(162) , chr(202)+chr(164) etc. , It may be problem from unicode character, I try to use command FW_SetUnicode( .F. ) but nothing change. How can I solve this problem.
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Incorrect Font Display
Just now tested with this program and it is working here.
Please try the above program as it is and let us know.
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local oWnd, oGet, cText := space(20 )
FW_SetUnicode( .T. )
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-25
DEFINE WINDOW oWnd
oWnd:SetFont( oFont )
@ 40,20 GET oGet VAR cText SIZE 300,40 PIXEL OF oWnd
@ 90,20 BUTTON "ฤฆต" SIZE 150,50 PIXEL OF oWnd ;
ACTION MsgInfo( cText )
ACTIVATE WINDOW oWnd CENTERED
return nil
Please try the above program as it is and let us know.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Incorrect Font Display
Also each Thai UTF8 character is represented by 3 bytes. Not 2 bytes
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Incorrect Font Display
My program is ANSI not Unicode. but some THAI characters is display like Unicode.
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Incorrect Font Display
Did you at all try the sample we posted?
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Incorrect Font Display
Dear K.Surasak,
Please let me see your sample code. I'm Thai. If you use Fw_setunicode(.T.), you must save your prg file as Encoding : UTF-8.
If you ANSI, don't use FW_SetUnicode(.F.) function.
Please let me see your sample code. I'm Thai. If you use Fw_setunicode(.T.), you must save your prg file as Encoding : UTF-8.
If you ANSI, don't use FW_SetUnicode(.F.) function.
Surasak wrote:My program is ANSI not Unicode. but some THAI characters is display like Unicode.
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Incorrect Font Display
We have done some tests and found this problem. Is this the problem you are reporting?I found the Font display incorrect when I enter some of 2 THAI character font for example chr(202)+chr(161) , chr(203)+chr(162) , chr(202)+chr(164) etc. , It may be problem from unicode character,
Individual characters are displayed correctly, but when concatenated we see a totally different text.
Source:
Code: Select all | Expand
#include "fivewin.ch"
// Thai ANSI chars
function Main()
local oFont, oThai
local aChar := { ;
{ 202, 161, nil, nil, nil, nil }, ;
{ 202, 161, nil, nil, nil, nil }, ;
{ 202, 161, nil, nil, nil, nil } }
AEval( aChar, < |a,i|
a[ 3 ] := Chr( a[ 1 ] )
a[ 4 ] := Chr( a[ 2 ] )
a[ 5 ] := a[ 3 ] + "+" + a[ 4 ] + '='
a[ 6 ] := a[ 3 ] + a[ 4 ]
return nil
> )
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-32
DEFINE FONT oThai NAME "Segoe UI" SIZE 0,-64 CHARSET 0xDE
XBROWSER aChar TITLE FWVERSION SETUP ( ;
oBrw:oDataFonts := { oFont, oFont, oThai, oThai, oThai, oThai }, ;
oBrw:cHeaders := { "ASC1","ASC2","CHR1","CHR2","CHR1+CHR2=","RESULT" }, ;
oBrw:nDataStrAligns := AL_CENTER, ;
oBrw:nHeadStAlighns := AL_CENTER );
AUTOFIT
RELEASE FONT oFont, oThai
return nil
What FWH version you were using before upgrade? This information helps us.
I tested with FWH1905 also but the behavior is the same.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Incorrect Font Display
Yes, you are right.It may be problem from unicode character
These combinations are being treated as 2-byte utf8 characters.
We are looking into how to resolve the issue for you.
Please give us a little time.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Incorrect Font Display
Thank You So Much nageswaragunupudi,
Yes, That is my problem, It happen when enter 2 of character ascII higher than 127, But If enter 1 or more than 2 character it will not happen.
My last version is FW17 (My Program work fine with this version and older version) , I have to use QRCODE function which FW17 not support,
I also found other some problem with FW24,
for example :
- at the first time when run the program it take 5 to10 seconds before program start
- When I try to use unicode by function FW_SetUnicode( .T. ) + HB_SETCODEPAGE( "UTF8" ) and change my code to UTF8,
I found class MENU display incorrect , I test by use function GetSysFont(), It work with function msginfo() but class MENU still display wrong font
- Function msginfo() the button is not center
I do not know How to post the picture on this forums, Please told me how can I post the picture to show my problem
Thank you every one for suppoting
Yes, That is my problem, It happen when enter 2 of character ascII higher than 127, But If enter 1 or more than 2 character it will not happen.
My last version is FW17 (My Program work fine with this version and older version) , I have to use QRCODE function which FW17 not support,
I also found other some problem with FW24,
for example :
- at the first time when run the program it take 5 to10 seconds before program start
- When I try to use unicode by function FW_SetUnicode( .T. ) + HB_SETCODEPAGE( "UTF8" ) and change my code to UTF8,
I found class MENU display incorrect , I test by use function GetSysFont(), It work with function msginfo() but class MENU still display wrong font
- Function msginfo() the button is not center
I do not know How to post the picture on this forums, Please told me how can I post the picture to show my problem
Thank you every one for suppoting
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Incorrect Font Display
No problem
We will resolve all your issues one by one and provide you with a revised library soon.
Please just be patient for a few days.
Meanwhile please execute this program and let me know the results:
We will resolve all your issues one by one and provide you with a revised library soon.
Please just be patient for a few days.
Meanwhile please execute this program and let me know the results:
Code: Select all | Expand
#include "fivewin.ch"
function Main()
? GetOEMCP(), GetACP(), HB_CDPSELECT()
return nil
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Incorrect Font Display
Dear nageswaragunupudi,
for my regular ANSI Program
? GetOEMCP(), GetACP(), HB_CDPSELECT() = 874,874,EN
for my Unicode Program
? GetOEMCP(), GetACP(), HB_CDPSELECT() = 874,874,UTF8
Thank you very much for your support
in case you want to contract direst, my e-mail is surasak@asic-net.com
for my regular ANSI Program
? GetOEMCP(), GetACP(), HB_CDPSELECT() = 874,874,EN
for my Unicode Program
? GetOEMCP(), GetACP(), HB_CDPSELECT() = 874,874,UTF8
Thank you very much for your support
in case you want to contract direst, my e-mail is surasak@asic-net.com
Re: Incorrect Font Display
Dear nageswaragunupudi,
Sorry for my fault, In case Unicode class MENU display incorrect , I found that I can assign FONT to this class to correct the font
I found some part of my Unicode program have to store space() to variable before take the value from database to variable ,
If not, GET command will cannot enter the THAI character
Sorry for my fault, In case Unicode class MENU display incorrect , I found that I can assign FONT to this class to correct the font
I found some part of my Unicode program have to store space() to variable before take the value from database to variable ,
If not, GET command will cannot enter the THAI character
Re: Incorrect Font Display
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
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
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Incorrect Font Display
Yes.
We did understand the issue soon after you posted this topic.
We also found out the source of the problem.
We are in the process of finding a solution.
Please give us a little time.
We did understand the issue soon after you posted this topic.
We also found out the source of the problem.
We are in the process of finding a solution.
Please give us a little time.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India