Page 1 of 1

The problem of mismatch encodings

Posted: Wed Apr 13, 2011 9:39 am
by dock1970
Script URL: http://testsite.ab.biz.ua/online_support/
Version of script: 2.2
Hosting company: freehost.com.ua
URL of phpinfo.php: http://testsite.ab.biz.ua/online_suppor ... hpinfo.php
URL of session_test.php: http://testsite.ab.biz.ua/online_suppor ... n_test.php
What terms did you try when SEARCHING for a solution: utf-8, encoding, mysql

Write your message below:
My database is in UTF-8 format. Article entered in Russian and in the database there are such characters "P" RјReS, SЂReR number RљRѕR · R "RѕRІ. Respectively to search for matches in the knowledge base in Russian does not give any results. Language file in UTF-8 format. Need your advice.

In English, everything works fine, try to find a word - windows

Re: The problem of mismatch encodings

Posted: Wed Apr 13, 2011 4:29 pm
by Klemen
It seems to be a problem with Javascript code because if you click the search button you do get results, right?

Try this if it helps:

1. open hesk_javascript.js in Notepad
2. change all instances of

Code: Select all

escape(
with

Code: Select all

encodeURIComponent(
3. upload the modified file to the server
4. clear your browser cache (temporary internet files), refresh the help desk and see if it works

Re: The problem of mismatch encodings

Posted: Thu Apr 14, 2011 7:10 am
by dock1970
Helped in part, the search began to work better, but not all of the words it finds.
But the problem of entering data into the database properly encoded.
I can not manage (phpMyAdmin) the database without understanding what is written there.
Here are some screen shots:
Tables
Image
Data posted by HESK forms
Image
Image
Image
Data posted by me in phpMyAdnin
Image
Image

Re: The problem of mismatch encodings

Posted: Thu Apr 14, 2011 12:59 pm
by dock1970
Change the encoding to windows-1251 all appear fine. In the database all is fine. Search finds articles from the knowledge base, if click the search button.
Quick Search. Try to find "windows"and "support" - finds the words. But can not find words in Russian using a quick search. Copy any word from the article and try to find using a quick search.

New link http://testsite.ab.biz.ua/test

I'm confused and very disappointed.
The script is excellent.
I can help test all if you say what to do next.

p.s. The original and modified hesk_javascript.js work the same with windows-1251.

Re: The problem of mismatch encodings

Posted: Mon Apr 18, 2011 1:13 pm
by dock1970
So, any ideas? Waiting for solution

Re: The problem of mismatch encodings

Posted: Tue Apr 19, 2011 7:35 pm
by Klemen
It must be some inconsistency with charsets - either on the browser or DB (phpmyadmin) part.

Note that when you're making changes to the charset - for example when you change it to URF-8, only NEW articles you add will be saved as UTF-8, not the old ones.

I'm afraid I don't have the time to test this at the moment, try playing a bit with charsets to see if you can get it to work. I will try in on my end next week when I have a break from my job.

Re: The problem of mismatch encodings

Posted: Wed Apr 20, 2011 8:23 am
by dock1970
Ok, thanx.