Lukket

PHP characters encoding

I have a project (phpauction) that gets from mysql the data that i search.

Until 10 minutes ago, the results could not display me correctly the Greek characters from mysql.

The search system searches the title of the item which contains English and Greek characters.

I solve this problem with this :

I use notepad for any encoding i do between ansi, unicode and utf8.

I wrote into notepad the title in English and for the Greek letters i wrote them in HTML encoded characters and i saved it as ANSI.

On phpmyadmin I uploaded the file choosing utf8 for Character set of the file and ANSI for sql compatibility.

i searched for that English word i wrote in the title and displayed to me the result WITH GREEK LETTERS correctly.

This is the only way to display Greek letters. I tried everything.

The problem is :

When i searched using that Greek letters that i wrote in the title the result showed me nothing. Then i searched again using the HTML encoded characters i used for that title and i got the result with Greek letters!

Having in mind that with HTML encoded characters the system found me the result, I guess there must be a line that it will convert the Greek characters to HTML encoded characters before it gives me the results.

So, to conclude : I need a script that if the user writes special characters, like Greek letters are, to be encoded to html characters, and if the user writes into the search box English characters it will proceed to the results without any encoding.

Have in mind that this conversion to html encoded chars it was the only one that worked form me to display correctly the Greek letters in a database and page that all are set to utf8. If there is a solution for this, instead of all the things I wrote please let me know. stripslashes(htmlspecialchars($row['title'], ENT_COMPAT, "UTF-8")); didn't work for me.

Thank you.

Færdigheder: PHP

Se mere: php characters, php greek encoding, php ansi encoding, php word encoding, php convert greek english, greek special characters php, php greek encode, php special chars ansi, ansi encode php, display greek characters php, thank letters, sql data conversion, data conversion sql, file notepad, php htmlspecialchars greek characters, htmlspecialchars greek letters, php encoding convert ansi, php ansi character encoding, php mysql encoding greek, php show encodign, php english chars, php greek ansi, php greek characters encode, convert greek sql, ansi greek english characters

Om arbejdsgiveren:
( 0 bedømmelser ) Nicosia, Greece

Projekt-ID: #317895

3 freelancere byder i gennemsnit $70 for dette job

infozone

Indeed, THERE IS a way to store Greek (or any other Unicode characters) in MySQL database without conversion to HTML entities. This is actually one of the worse possible solutions - not only it makes seach difficult bu Mere

$150 USD på 1 dag
(5 bedømmelser)
3.7
prophp

I must do this.Please contact me.

$30 USD på 1 dag
(1 bedømmelse)
0.0
jkoutroubis

hello sir. i'm john from greece and i know how to make it work with greek. hope to cooperate with you. thank you

$30 USD på 1 dag
(0 bedømmelser)
0.0