FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TGET strange behavior for Unicode.
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
TGET strange behavior for Unicode.
Posted: Thu Aug 16, 2018 05: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.

post 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 (fw): Select all Collapse
@ 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 2304 / 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)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TGET strange behavior for Unicode.
Posted: Thu Aug 16, 2018 09:55 AM
1) Please reset the character set to "utf8" collation "utf8_unicode_ci"

2) Define the Get like this:
Code (fw): Select all Collapse
@ 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
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: TGET strange behavior for Unicode.
Posted: 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 2304 / 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)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TGET strange behavior for Unicode.
Posted: Tue Aug 21, 2018 04:19 AM
Code (fw): Select all Collapse
oGet[07]:nMaxChars := MEMVAR->REP:FIELDLEN( "REP_FIL" )


Alternatively, you can set globally
Code (fw): Select all Collapse
MYSQL_MaxPadLimit( 255 )
Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: TGET strange behavior for Unicode.
Posted: Wed Aug 22, 2018 04:11 AM
Dear Mr.Rao,

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


Thank you so much.
Regards,

Dutch



FWH 2304 / 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)

Continue the discussion