Character Sets and Multibyte Strings

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin Laurence

    Character Sets and Multibyte Strings

    Can someone help me with a character set/encoding problem?

    I am using a MySQL database with PHP to store the name "Bedrich". Notice the
    letter "r" in the name. It has an accent, just as it does in the following
    Wikipedia entry: http://en.wikipedia.org/wiki/Bedrich_Smetana.

    On my PHP-generated HTML page it's displayed as "Bed?ich". What am I doing
    wrong?

    MySQL is configured to use UTF-8, and I can see that it's working when I
    view the data through phpMyAdmin.

    My web page contains the line "<meta http-equiv="Content-Type"
    content="text/html; charset=utf-8" />".

    Should I be using multibyte strings in my PHP code? Any help would be
    appreciated.

    Thanks.


  • Iván Sánchez Ortega

    #2
    Re: Character Sets and Multibyte Strings

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Kevin Laurence wrote:
    [color=blue]
    > My web page contains the line "<meta http-equiv="Content-Type"
    > content="text/html; charset=utf-8" />".[/color]

    Don't. Use header() to specify the encoding. And use a web browser capable
    of manually switching the enconding (such as Konqueror), in order to see if
    the enconding is the real cause of the problem.

    - --
    - ----------------------------------
    Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

    Un ordenador no es un televisor ni un microondas, es una herramienta
    compleja.
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)

    iD8DBQFD+5IK3jc Q2mg3Pc8RAhGLAK CCBkAGFNkAVtUih 396gcg4aLDnSgCe JhYC
    +Obxp8tL5zI+ftg muucA4IY=
    =K/ur
    -----END PGP SIGNATURE-----

    Comment

    Working...