1
echo '´';

just shows a question mark. I also tried with double quotes, but the same thing happens. I even tried adding a backslash in case it is an escaped character, but that just prints the backslash before the question mark.

I have <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" > set, and going to Tools -> Page Info on Firefox shows UTF-8.

So why can't I echo an acute accent?

CuppaJoe
  • 11
  • 4

1 Answers1

3

Works for me.

I'm fairly sure that your editor is using an encoding different from UTF-8, most likely ISO-8859-1 most likely UTF-16 (as @BoltClock points out, the backtick is a basic ASCII character so it would work if it were ISO-8859-1).

Pekka
  • 442,112
  • 142
  • 972
  • 1,088
  • Thanks, but I also have some code that queries the database and echos a name from the database (which is UTF-8). When a ´ is in the name, it displays correctly in PHPMyAdmin, but still just a question mark in the browser. So it can't be the editor, because it also happens when ´ is taken directly from the database. – CuppaJoe Dec 29 '10 at 10:57
  • @CuppaJoe strange. Are you 10000% sure you are referring to the backtick character and not a fancy Unicode quote character? – Pekka Dec 29 '10 at 11:00
  • I'm pretty new to programming so I'm fuzzy on this. Is there some way I can verify that? On my Swedish keyboard, it's to the left of the backspace (without pressing shift): http://en.wikipedia.org/wiki/File:Keyboard_Layout_Swedish.png – CuppaJoe Dec 29 '10 at 11:09
  • @Cuppa nope, that is definitely the right one. This is really strange. Any chance of a live link? – Pekka Dec 29 '10 at 11:10
  • @Cuppa Without pressing shift it's a "foretick", or accute accent. With shift it'd either be the grave accent or a backtick (don't know). – deceze Dec 29 '10 at 11:19