|
-
Apr 25th, 2010, 04:47 PM
#1
Thread Starter
Addicted Member
Text output problem (�)
Hello.
When i grab text out of my database and do a output trough smarty or print_r($content) i get these characters: �
the characters i use in the content are: ë " ä
My question is how can i solve this problem?
-
Apr 26th, 2010, 08:39 AM
#2
Addicted Member
Re: Text output problem (�)
I entered the following characters: 'ë', 'ö', 'õä' and 'ü' inside a table in MySQL database. When I printed it out with echo, and print_r everything displayed correctly without that symbol you are getting. In my database table, I set Collation as latin1_swedish_ci. I suggest you try this or preview your work in another computer to see how it displays.
There might be other solutions.
-
Apr 26th, 2010, 02:06 PM
#3
Thread Starter
Addicted Member
Re: Text output problem (�)
the problem is in the database everything corrent.
When i use a debugger and debug the var then everything is also correct.
only when i print the var i have the problem.
if i but a ë on the html page then its also correctly displayed.
-
Apr 26th, 2010, 07:59 PM
#4
Re: Text output problem (�)
This is a charset problem.
What does the function mysql_client_encoding return?
PHP Code:
echo mysql_client_encoding($db_handle)
What is the Content-type header for your page? Does the charset you are telling the browser to use match the value returned above?
Code:
Content-type: text/html; charset=utf8
Use Page Info (Firefox) or Properties (IE) to check this header if you're not sure.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|