latin2_hu: no problem until resorting or filtering the table

Talk about Multi-Language tricks, problems, errors etc.

Moderator: alexandrleonenko

fcsabihu
Junior
Junior
Posts: 14
Joined: Oct 14th, '09, 08:54

latin2_hu: no problem until resorting or filtering the table

Postby fcsabihu » Oct 14th, '09, 09:08

Hello

I use latin2_hungarian_ci collation in my database and th datagrid is also set to this collation. When first displayed, the data are well written out but whenever the page is reloaded by a filter or the ordering, the accented chars turn into sg different (haha - I can't post them cause the forum engine won't accept my message :)

Any ideas?

Cheers

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: latin2_hu: no problem until resorting or filtering the table

Postby administrator » Oct 14th, '09, 23:03

what version you work with?

fcsabihu
Junior
Junior
Posts: 14
Joined: Oct 14th, '09, 08:54

Re: latin2_hu: no problem until resorting or filtering the table

Postby fcsabihu » Oct 15th, '09, 08:50

PHP DataGrid Pro version 5.0.7 (20.06.2009)

fcsabihu
Junior
Junior
Posts: 14
Joined: Oct 14th, '09, 08:54

Re: latin2_hu: no problem until resorting or filtering the table

Postby fcsabihu » Oct 15th, '09, 09:02

I noticed today that the table header doesn't change, only the table data do.

Before:
Image
After:
Image

... and I guess the above are Polish characters, I'm not sure.

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: latin2_hu: no problem until resorting or filtering the table

Postby administrator » Oct 17th, '09, 20:06

Did you try a last version of Datagrid?

fcsabihu
Junior
Junior
Posts: 14
Joined: Oct 14th, '09, 08:54

Re: latin2_hu: no problem until resorting or filtering the table

Postby fcsabihu » Oct 19th, '09, 10:15

administrator wrote:Did you try a last version of Datagrid?


Okay, I upgraded to the latest version. The encoding problem didn't change, but I got a strange error: the frame height gets reduced so I can see only 3 rows :cry:

Does it have to do anything with the Smarty template engine, maybe?

How I use it is as follows:

- From the core php file I build up the menus and different stuff.
- I call Smarty which renders the frame of my application.
- In the templates I include my datagrid php files.

Thanks

fcsabihu
Junior
Junior
Posts: 14
Joined: Oct 14th, '09, 08:54

Re: latin2_hu: no problem until resorting or filtering the table

Postby fcsabihu » Oct 20th, '09, 11:57

I made a change to the datagrid.class.php, from line 682:

Code: Select all

// encoding & direction ------------------------------------------------
        $this->encoding = "latin2";
        $this->collation = "latin2_hungarian_ci";
        $this->direction = "ltr";


This solved the display problem. Now I have only one problem:

When using filter or search, if the search string criteria contains accented letters, the search returns no results. (This also occured before the change to these lines.) Checked the query in debug mode:

Code: Select all

search sql (total: 0) SELECT bookingID, hs_users.userNAME as userNAME [...] WHERE bookingID <> 0 AND ( LCASE(hs_partners.partnerNAME) = 'bnky leke' ) ORDER BY 3 asc LIMIT 0, 25


the string 'bnky leke' misses the letter 'á', although the argument is passed correctly:

Code: Select all

GET: Array ( [sect] => foglalasok [abc_page_size] => 25 [abc_sort_field] => 3 [abc_sort_field_by] => [abc_sort_field_type] => [abc_sort_type] => asc [abc__ff_hs_partners_partnerNAME_operator] => = [abc__ff_hs_partners_partnerNAME] =>Bánky Leke [abc__ff_hs_bookings_departure_operator] => = [abc__ff_hs_bookings_departure_fo_date] => [abc__ff_hs_bookings_arrival_operator] => = [abc__ff_hs_bookings_arrival_fo_date] => [abc__ff_hs_hotels_hotelNAME_operator] => = [abc__ff_hs_hotels_hotelNAME] => [abc__ff_hs_users_userNAME_operator] => = [abc__ff_hs_users_userNAME] => [abc__ff_hs_countries_countryNAME_operator] => %3D [abc__ff_hs_countries_countryNAME] => [abc__ff_selSearchType] => 0 [abc__ff_onSUBMIT_FILTER] => Keresés )


PS. I downgraded to version 5.0.7.


Return to “Multi-Language implementation”