Three little characters  designed to make your life hell
By Martyn in Programming | 0 comments
On more than one occasion these characters  have turned up just when everything else seems fine. Like a tiny weeney scratch on a new car, one that only you know about, these little bastards turn up and take the rest of the day to diagnose.
So what  is for?
-  cannot be smoked or injected
- Too much  causes stress in older programmers
- Does  increase or decrease carbon emissions?
- is  useful for anything? How does it help?
What is  ???
 is often seen at the top left corner of a web page. When you open the source file and compare that to the output source you will not find , so what causes  to appear in your file?
The secret to diagnosing  is to avoid looking for the obvious. If you have code that looks like this:-
<?php echo "Hello World"; ?>
placed in a file called hello.php and you run this directly (ie not as an include file) then you may wonder wtf is going on? How come  turns up? When you run it the output looks like this:-
Hello World
The reason is your editor has saved the file as UTF-8. With the ever increasing complexity of character encoding some editors will automatically ignore your settings and update your configuration to use UTF-8. Even if you have been using ASCII without any trouble since 1982!
So what you may ask? Winjii, it’s so you can type in Winjii. Not sure what it is, but the 127 characters provided by ASCII’s not enough for some languages, they need more because they are not able to express themselves with so few characters.
Well there’s *$@# chance that I will ever need any more so the solution at least for me is straightforward.
The Fix
Change the character encoding of your page. With most editors all you need to do is select properties and then choose ASCII then save the file.
Changing the meta tag alone is not enough, with extended attributes on files now no one can be sure where a browser or whatever reader your using will use to determine how to display it.
email this | tag this | digg this | trackback | comment RSS feed
Post a Comment