Results 1 to 4 of 4

Thread: Text output problem (�)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    Belgium
    Posts
    167

    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?

  2. #2
    Addicted Member
    Join Date
    Sep 2005
    Posts
    150

    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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    Belgium
    Posts
    167

    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.


  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    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
  •  



Click Here to Expand Forum to Full Width