Does Hesk support Chinese Search?

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
youtube2046
Posts: 4
Joined: Wed Nov 07, 2012 12:53 am

Does Hesk support Chinese Search?

Post by youtube2046 »

Script URL: http://hesk.155600.com/helpdesk/
Version of script: 2.4.1
Hosting company: xrnet.cn
URL of phpinfo.php: http://hesk.155600.com/helpdesk/phpinfo.php
URL of session_test.php: http://hesk.155600.com/helpdesk/session_test.php
What terms did you try when SEARCHING for a solution: Search Unicode Words

Below is my question:

Hi, I'm from China, and I'm trying to localize Hesk into Chinese. I installed as guided in the readme.html and everything works ok for now.

I added some Articles in Chinese in the KnowledgeBase, and some articles in English copied from Hesk site. But when I try to search in Chinese, no result returns, though I'm sure the searched Chinese words are included in the articles. While search English words, it shows the English Articles containing the words.

And the Article Suggest in KnowledgeBase has the same problem.

So it seems to me that Hesk doesn't support Chinese words Search and only limited to English words. Am I right?
Or you have some special solutions for that?

Deadly need your help.
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Does Hesk support Chinese Search?

Post by Klemen »

Seems to work fine in my test setup?

Do you have access to phpMyAdmin? Could you check inside your database if Chinese words are stored like they should be, or are they changed to HTML entities (they look something like Ƨ )?

Also, make 101% sure all the tables have charset encoding set to UTF-8
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
deserteagle369
Posts: 94
Joined: Wed Feb 29, 2012 2:00 am

Re: Does Hesk support Chinese Search?

Post by deserteagle369 »

youtube2046, Hesk support search Chinese, definitely! but the suggestion only support Eng because the default full text engine can not support Chinese.

Like Klemen said the problem is your encoding process, the Chinese text in your mysql db is not readable.
Eagle
Life is a journey.
youtube2046
Posts: 4
Joined: Wed Nov 07, 2012 12:53 am

Re: Does Hesk support Chinese Search?

Post by youtube2046 »

Thanks Klemen for your quick reply! and thank you deserteagle369 for your addon answer.
Really glad to konw that Hesk supports Chinese Search. Really Great Work!
Do you have access to phpMyAdmin? Could you check inside your database if Chinese words are stored like they should be, or are they changed to HTML entities (they look something like Ƨ )?
I logged into the phpMyAdmin, and checked that the Chinese words displayed as they should be. They are stored in Chinese, but not changed to something like Ƨ.
Here are the snaps to show it:

Browse the table to check the records:
http://hesk.155600.com/helpdesk/img/err ... dsShow.png

Edit one of the records:
http://hesk.155600.com/helpdesk/img/err ... Record.png

Also, make 101% sure all the tables have charset encoding set to UTF-8
I checked the db structure and see that the Collation is set to utf8_unicode_ci.
snap:
http://hesk.155600.com/helpdesk/img/err ... ucture.png

But I'm confused when checking MySQL charset:
If I select the UI of phpMyAdmin to English, it displays: MySQL charset: UTF-8 Unicode (utf8)
snap:
http://hesk.155600.com/helpdesk/img/err ... nglish.png

when UI to Chinese Simplified, it displays the same as in English
snap:
http://hesk.155600.com/helpdesk/img/err ... hinese.png

While UI to Chinese Simplified GB2312, it displays: MySQL charset: cp1252 West European (latin1)
snap:
http://hesk.155600.com/helpdesk/img/err ... GB2312.png

I'm sorry that I'm not farmiliar with phpMyAdmin and MySQL, so I'm confused whether the MySQL charset encoding is set to UTF-8.

Really need your help to position the problem.
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Does Hesk support Chinese Search?

Post by Klemen »

Can you try this:

1. in your MySQL configuration (option file, usually my.ini or my.cfg) set

Code: Select all

ft_min_word_len=1
2. restart mysql, then go to phpmyadmin and run this code:

Code: Select all

REPAIR TABLE hesk_kb_articles QUICK
3. test KB search again

Any luck?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
youtube2046
Posts: 4
Joined: Wed Nov 07, 2012 12:53 am

Re: Does Hesk support Chinese Search?

Post by youtube2046 »

Thanks Klemen.

I'm using a shared space and don't have access to modify the my.ini or my.cfg file.
I'm writing to them for help to change that.

Hope they can do it for me.

I'll report back after that.
youtube2046
Posts: 4
Joined: Wed Nov 07, 2012 12:53 am

Re: Does Hesk support Chinese Search?

Post by youtube2046 »

Sorry for the late reply.

My ISP said they can't do this change for me, because this could possibly caused the others' website bad effects. :(

So Klemen, is there another method for it?
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Does Hesk support Chinese Search?

Post by Klemen »

Fulltext search will not work with Chinese without this because of MySQL limitations and language specifics (Chinese doesn't have word boundaries - spaces, so MySQL doesn't distinguish words for search).

A workaround may technically be possible (to break words into single chars then do a search for each word in each applicable field), but I would strongly discourage anything like this as it would possibly add significant load and overhead to the database/script execution :(
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
deserteagle369
Posts: 94
Joined: Wed Feb 29, 2012 2:00 am

Re: Does Hesk support Chinese Search?

Post by deserteagle369 »

In my case, KB suggestion and KB search are different:

KB suggestion (it show up when you tying) is full text search which only support number and english.

KB search (it show result after you press enter or click "search help" button) is normal search, I change it to support multiple keyword search and highlight keyword in result (you can find the code in my post).

I tried to implement full text search for Chinese but finally give up, because the workable solution is install a 3rd party search engine, too complicated.
Eagle
Life is a journey.
Post Reply