0

I'm getting a quite curious error when displaying text on a webpage. I'm working on converting a set of pages from ISO-8859-15 to UTF-8. As I'm getting texts from various sources on that page, I'm using iconv to convert from ISO-8859-15 to UTF-8.

$arbeitstext=iconv("ISO-8859-15", "UTF-8", $arbeitstext);

I'm also setting the page header of the page with header('Content-Type: text/html; charset=utf-8');

and the page in question is saved (and converted) as UTF-8 via notepad++.

So far so good - the output of, for instance, ä, ö, ü alone works fine. In combination with ` however, () it results in lots of à characters.

I'm depending on combinations such as `ü, `Ü, `$,`&,´§,

etc. for another function, (replacing them with different strings), so this is quite an issue for me.

My firebug log suggests that the page-header is correctly set as utf8. The SQL Database from where I'm getting my texts is also set as UTF-8. What am I missing?

Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592
Alasdair
  • 45
  • 5
  • There's too little detail given to say anything concrete. How are these characters encoded exactly at what point? Use `bin2hex($str)` to test that. Trace throughout your app when and how they get converted to what from what. – deceze Dec 21 '15 at 16:19
  • I cannot know if something is missing, but have you examined your settings for the character set of the connection to the database? Are the fields in the database utf8, or utf8mb4? Same for the connection. Just taking a whack at trying to be helpful. :) – Anthony Rutledge Dec 21 '15 at 16:33

0 Answers0