c := chr(202)+chr(161) // check other combinations also
? hb_strisutf8( c ) // --> .T.
Enrico Maria Giordano wrote:hb_isstrutf8() is not in any of the [x]Harbour libs.
hb_strisutf8
nageswaragunupudi wrote:There is a real problem.
This is arising because the above 2 byte character combinations are being treated as a single UTF8 character but not as 2 ANSI characters
Please check this Harbour function
- Code: Select all Expand view RUN
c := chr(202)+chr(161) // check other combinations also
? hb_strisutf8( c ) // --> .T.
This is wrong. We should get .F.
Please check and confirm.
I am looking into how to fix the problem
K.Surasak,
What is chr(202)+chr(161) represent for (which character in Thai) ?
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.
nageswaragunupudi wrote:Thanks.
What is the FWH version you are using?
nageswaragunupudi wrote:Thanks.
What is the FWH version you are using?
#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
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.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 42 guests