Hi all,
I have a problem with my php and mysql project.
I use an auctions software, named phpauction for my project.
I import into my database with utf8 encodingm and I can see the greek letters inside the fields.
The problem is that when i go to the site for the results, I get question marks instead of the greek characters.
I have searched a lot, and i found that there is a solution by adding mysql_query("SET NAMES utf8") after mysql_select_db.
Is that correct?
Also, i can not find the mysql_select_db in any of the files.
P.S. When I import to mysql i do it from a notepad file that i save it to *****.sql
I used the default encoding and utf8 encoding but nothing.
i export the query i imported and did these:
I uploaded in the sever and with default encoding Greek, it was displayed correctly. I changed browser encoding to UTF8 and i got question marks.
Then using Notepad again i saved it with utf-8 encoding and now it is displayed correctly with UTF8 encoding select by default to the browser.
So, I guess some of my pages are not designed for utf8 encoding.
If it is so, that gives me two options.
A. To get the html code of all my pages, open it with notepad and encode it with utf8
B. To put the meta charset for utf8 to all of my pages. ( Have in mind that i did that for the pages that are used for the searching section, and also I did it with the combination of saving it with notepad in utf8 )
Also, I import some items for the importing/exporting test you told me.
I have mysql and collations to utf8 general ci
1. Using the default encoding of notepad,I import the sql file and i got question marks. i did not exported it.
2. I saved the sql with utf8 encoding now. I uploaded it and mysql displays it right. I searched it through the site and it gave me question marks again. The encoding of browser is set to UTF8. Then i exported it from mysql, saved it into html, uploaded it, opened it and with greek encoding (default is right) utf8 gives me question marks