TGET strange behavior for Unicode.

TGET strange behavior for Unicode.

Postby dutch » Thu Aug 16, 2018 5:40 am

Dear Mr.Rao,

I got the TGET limitation. I define column as VARCHAR 250.

But I can enter character 100 characters only as picture.

Imagepost pics

I try to change Character Set from "UTF8" to "latin1". It is still allow to enter 100 characters only.

When I use len() function to check the column size, it show 100.

I try to use as below;

Code: Select all  Expand view
@ 85, 55 GET oGet[07] VAR MEMVAR->REP:REP_FIL    OF oDlg SIZE 240,13 PIXEL ANSI LIMITBYCHARS .F. CHRGROUP CHR_ANSI


It is still doesn't work.

I try to add character in other tool (Navicat) more 100 character, become 150. When I use Len() it show 150.

Thank you in advance.

Best regards,
Dutch
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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: TGET strange behavior for Unicode.

Postby nageswaragunupudi » Thu Aug 16, 2018 9:55 am

1) Please reset the character set to "utf8" collation "utf8_unicode_ci"

2) Define the Get like this:
Code: Select all  Expand view
@ 85, 55 GET oGet[07] VAR MEMVAR->REP:REP_FIL    OF oDlg SIZE 240,13 PIXEL CHRGROUP CHR_WIDE
oGet[07]:nMaxChars := 255
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10259
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: TGET strange behavior for Unicode.

Postby dutch » Thu Aug 16, 2018 10:33 pm

Dear Mr.Rao,

Thank you so much. It's working now.
Why does the program desire ::nMaxChars from column length? Because we have to modify program, if we change the columns size.

Thanks in advance.
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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: TGET strange behavior for Unicode.

Postby nageswaragunupudi » Tue Aug 21, 2018 4:19 am

Code: Select all  Expand view
oGet[07]:nMaxChars := MEMVAR->REP:FIELDLEN( "REP_FIL" )
 


Alternatively, you can set globally
Code: Select all  Expand view
MYSQL_MaxPadLimit( 255 )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10259
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: TGET strange behavior for Unicode.

Postby dutch » Wed Aug 22, 2018 4:11 am

Dear Mr.Rao,

This one is working well.
[quote="nageswaragunupudi"]
Code: Select all  Expand view
oGet[07]:nMaxChars := MEMVAR->REP:FIELDLEN( "REP_FIL" )
 


Thank you so much.
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)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 14 guests