Problem with Greek characters

Reply

Join Date: Mar 2008
Posts: 100
Reputation: petr.pavel is an unknown quantity at this point 
Solved Threads: 14
petr.pavel's Avatar
petr.pavel petr.pavel is offline Offline
Junior Poster

Re: Problem with Greek characters

 
0
  #11
Sep 20th, 2008
Originally Posted by Punkis448 View Post
1. I saved the following to a html file. 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.
That's understandable, only one of them will work. Just a question: is the text really in Greek language? I don't know what your nationality is so I don't know if you're saying Greek meaning "some rubbish characters" or if you're saying Greek because it really is and should be Greek alphabet. (No offence here, people call dummy fill-in text "Lorem ipsum" "Greek".)

If you want to work with UTF-8 you have to work with UTF-8 only - you can't have a part in iso-8859-7 (or what is it that you have) and part in UTF-8. There's no point in saving from notepad in anything else than UTF-8, all of your HTML pages must be saved in UTF-8 etc.

For testing if the SQL is in UTF you don't have to upload it to server. Just change the extension to .html, open the file locally in your browser, change browser encoding do UTF and see what you got.


Originally Posted by Punkis448 View Post
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 )
Well, you have to do both - all your files (that work with the UTF-8 content of your database) must both themselves be in UTF-8 and their meta charset must show that.
Petr 'PePa' Pavel

The more information you give the more relevant answer you get.
Please consider using "Add to ... Reputation" and mark your thread as Solved if you found what you were looking for. By giving feedback you help others.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 100
Reputation: petr.pavel is an unknown quantity at this point 
Solved Threads: 14
petr.pavel's Avatar
petr.pavel petr.pavel is offline Offline
Junior Poster

Re: Problem with Greek characters

 
0
  #12
Sep 20th, 2008
Originally Posted by Punkis448 View Post
... I uploaded it and mysql displays it right. ...
You're being imprecise. What "mysql" displays it right? phpMyAdmin? or you're logged into MySQL using default command line client? If yes then what operating system you run the client on (Windows? Or do you connect to your server via ssh and there you run the command line client?) Your client or something along the way may translate the encoding so you have to provide exact information.

For instance, phpMyAdmin itself runs in some encoding (you can change that, you should be using UTF-8 - check in your browser). Then when you import using phpMyAdmin (you still didn't tell me what you use for importing) you tell phpMyAdmin what the source encoding is. The attribute you import to must also be in UTF-8 otherwise it would normally display rubbish but your browser might change its encoding based on content auto-detection without you even noticing it.

I hope you're not copy/pasting the sql into something that doesn't run in UTF-8...
Petr 'PePa' Pavel

The more information you give the more relevant answer you get.
Please consider using "Add to ... Reputation" and mark your thread as Solved if you found what you were looking for. By giving feedback you help others.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 31
Reputation: Punkis448 is an unknown quantity at this point 
Solved Threads: 0
Punkis448 Punkis448 is offline Offline
Light Poster

Re: Problem with Greek characters

 
0
  #13
Sep 20th, 2008
I do use Greek letters. My language is Greek.

I have found this link http://gr2.php.net/htmlentities is that useful ?
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 31
Reputation: Punkis448 is an unknown quantity at this point 
Solved Threads: 0
Punkis448 Punkis448 is offline Offline
Light Poster

Re: Problem with Greek characters

 
0
  #14
Sep 20th, 2008
I tried to find the file that does this work (as i said is not developed by me)
and found this :

  1. /* this subastas title and link to details */
  2. $tplv['id']=$row['id'];
  3. $tplv['idformat']="<A HREF=\"".$SETTINGS['siteurl']."item.php?id=".$row['id']."\">";
  4.  
  5. $tplv['idformat'] .= stripslashes(htmlspecialchars($row['title'])); $tplv['idformat'].= "</FONT></A>";


so i guess there must be something with this
  1. $tplv['idformat'] .= stripslashes(htmlspecialchars($row['title']));
Last edited by peter_budo; Sep 22nd, 2008 at 4:07 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MySQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC