0

I am using Swedish characters in my SQL database, and they seem to be working fine there. But, when I want to display them in my HTML files, they don't seem to work and become question marks. Anyone knows how to fix something like this?

Paulie-C
  • 1,674
  • 1
  • 13
  • 29
Kriss0612
  • 57
  • 1
  • 10
  • Please [edit] your questio to include the definition `SHOW CREATE TABLE tablename` of your table in MySQL. We're looking for the character set used to store the column of data that's malfunctioning. – O. Jones Apr 08 '17 at 11:15
  • When you hard code (not from database) Swedish signs in your HTML, are they displayed normally? – Oto Shavadze Apr 08 '17 at 11:22
  • Yes, when I hard code Swedish signs they work normally. I am using the latin1_swedish_ci character set. – Kriss0612 Apr 08 '17 at 11:28
  • What language do you use ? PHP? C#? ... – Oto Shavadze Apr 08 '17 at 11:33
  • I code using PHP – Kriss0612 Apr 08 '17 at 11:36
  • Show us your PHP to database connection code – Oto Shavadze Apr 08 '17 at 11:37
  • For the connection to the database: – Kriss0612 Apr 08 '17 at 11:42
  • There doesnt seem to be anything weird with the imported data besides the Swedish signs – Kriss0612 Apr 08 '17 at 11:44
  • Stop using `mysql_` functions. They have been deprecated for years now, and versions since PHP 7 don't support them anymore. – trincot Apr 08 '17 at 11:44
  • Possible duplicate of [UTF-8 all the way through](http://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – trincot Apr 08 '17 at 11:46
  • Please take the contents of your comment at `Apr 8 at 11:42` and edit them into the question, using the formatting tools. Thanks! As it stands the question does not have enough detail to be regarded as on-topic. I appreciate it is already solved, but we still would like questions to be maintained here. Thanks. – halfer Apr 13 '17 at 13:23

1 Answers1

0

Setting the charset in the "connect" file to utf8 worked.

Kriss0612
  • 57
  • 1
  • 10
  • Please click the green tick mark adjacent to this answer, so it is marked as accepted. Thanks. – halfer Apr 13 '17 at 13:24