I can't get the inverted exclamation point. I've tried "¡" and I've tried lang="es" in the html tag. This should be a piece of cake, or flan or whatever. Can someone shine some light on this one for me?
| SitePoint Sponsor |

I can't get the inverted exclamation point. I've tried "¡" and I've tried lang="es" in the html tag. This should be a piece of cake, or flan or whatever. Can someone shine some light on this one for me?

¡ is what you're after.


Or ¡ or ¡. You can even insert a literal '¡' character, but make sure that your character encoding is declared correctly (pay special attention to the HTTP Content-Type header sent by your web server).
The lang attribute has no relevance whatsoever in this case.
Birnam wood is come to Dunsinane

So what should the Content-Type header include? My PHP is sending:Originally Posted by AutisticCuckoo
PHP Code:header("Content-type: text/html; charset=utf-8");


That depends which encoding you use when saving your .php file. If you save as UTF-8, then the Content-Type header should specify UTF-8. If you save as ISO-8859-1 or Windows-1252, then your header should specify ISO-8859-1 or Windows-1252, respectively.
If you save as ISO-8859-1 and serve as UTF-8 (or vice versa) it won't work.
Birnam wood is come to Dunsinane

I found my mistake -- I was looking in the wrong place. The string that required the inverted exclamation point appears in two places within the page; one is hidden initialy while the other is not. And surely the rest of the story is obvious.
Another reason to store repeated strings in vars!
Bookmarks