mi sitio web no puede mostrar texto en otro idioma

I have a sign up page with select option: country.

I copy the list of country from Google account registration because it would be better to display both English and the local language.

But my website is unable to display many other language, it shows some random code.

  • Afganistán (افغانستان‎)
  • Åland Islands (Åland)
  • Albania (Shqiperi)
  • Argelia (الجزائر‎)
  • Hong Kong (香港)
  • Irán (ایران‎)
  • Irak (العراق‎)
  • Vietnam (Viet Nam)
  • Western Sahara (‫الصحراء الغربية‬‎)
  • Yemen (اليمن‎)

Example,for Hong Kong, instead of 香港, it display 香港

There are lot more but I do not want to display all of them.

I am using php and xampp in my website. Am I missing any setting or plugins?

Gracias por su ayuda!

preguntado el 28 de mayo de 14 a las 14:05

It has nothing to do with xampp, windows 8.1 or sublime text2. -

tal vez echar un vistazo a UTF8 -

probably charset is not set in html -

3 Respuestas

I think its a problem with your charset add this

<meta charset="utf-8">

Entre tu <head> </head> etiquetas

If you use a database, for example mysql make sure to change it there too

contestado el 28 de mayo de 14 a las 14:05

Mejor uso <meta /> en lugar de <meta> although in HTML, nothing happens when you use another. - Jamie

it's a void element I think it isn't necessary to add the /. In the w3 documentation they have examples and don't use the slash w3.org/html/wg/drafts/html/master/… - 0originales

Add meta tag with charset in head section.

    <meta charset="UTF-8" />

contestado el 28 de mayo de 14 a las 14:05

You should deliver your pages UTF-8 encoded:

  1. Store your HTML page UTF-8 encoded with your editor.
  2. Add the meta information to your HTML header like <meta charset="UTF-8">
  3. Set your database connection to UTF-8 before you do any queries. Example: $mysqli->set_charset('utf8');.

This small article describes the necessary steps to use UTF-8 for the website.

contestado el 28 de mayo de 14 a las 14:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.