i'm getting started to mysql/php. (from K. Yank's book)
I finally got to learn how to retrieve data from mysql, but i got this:
obriga‡Æo
What was written in mysql was:
obrigatório
First, these strange characters also apeared in mysql, but i went to "my" file and added this:
"language=portuguese"
Now, in mysql these characters dont appear anymore. They appear in my web page.
Do you think the problem lies in mysql or in php configurations?
What is the solution?
thanks in advance
i guess i didnt made myself clear enough.
Let me try:
in my language (portuguese), apple writes==maçã.
If i make an insert (using DOS) in mySQL writting 'maçã', when i use a php script to read the database, in my web page i get: 'ma‡Æ', which is ilegible!!!.
On the other hand, if i use a php script to store data in the database and in the web page i insert the correct word 'maçã', when i retrieve the data, i can read in a web page the right word 'maçã', but if i go to the DOS window and i read the database, in mySQL the word written for 'maçã' is: 'maþÒ'.
I tried the following solutions (none resulted)
1) went to 'my' mySQL file and wrote:
"language=portuguese"
2) went to php.ini and and under data handling, wrote:
default_charset = "iso-8859-1"
No way...
How can i overcome this?
Can anyone help please?
thanks!
You mean i should use character entities when?
a)writing in dos/mySQL,
or
b)in php scripts?
i wonder, is there something like this asp function:
<%=Server.HtmlEncode("maçã")%>
in php or in mySQL?
Bookmarks