Hi guys,

I need to hard code some text and some hyperlinks into page.tpl.php and template.php that contain special characters (non-latin or non-English letters) . As soon as I save the files the characters become gibberish and so they appear on the website, although, if I retrieve from the database text with such characters they display fine.

Please give me a suggestion.

Comments

bojanz’s picture

You aren't saving the files with the proper encoding (UTF-8).
Every more advanced text editor has this option (usually in the File -> Save As dialog, for example).

steven9’s picture

bojanz, thank you very much for the answer. I went to notepad and saved the page.tpl.php file again with UTF-8 and uploaded it. I don't get the gibberish anymore, now I get just a string of question marks. something like this ???? ? ?? ??? ???????, ?? ????? ?? ???? how can I solve the question marks? Inside the node content the characters do appear just fine.

steven9’s picture

Never mind, my bad! It works. Thank you so much bojanz, your solution works.

princechrisvic’s picture

I'm having the same problem with specials characters. They appear ???????. How can I make it to display well. Thanks