A slightly new version:

http://www.depressedpress.com/DepressedPress/Test/

This one fixed several string parsing errors - one of which I feel is
interesting enough to talk about:

Apparently IE 6 has a problem with "\v" (the escape character for "Vertical
Tab".

I'm creating a hash table of characters for each encoding scheme.  This hash
table is looped through and all characters are replaced with their encoded
versions.  However "\v" was causing trouble.  Try this code in IE 6 and
FireFox:

        // Set a string
CurString = "The quick brown fox jumped over the lazy dog.";
        // Set a hash table of chars to be encoded and their encoded
versions
Chars = new Array();
Chars["\v"] = "\\v";

for ( var CurChar in Chars ) {
        if (typeof Chars[CurChar] != "function") {;
                CurRegEx = new RegExp(CurChar, "g");
                CurString = CurString.replace(CurRegEx, Chars[CurChar]);
        };
};

alert(CurString);

In (at least in my version of) IE 6 the code replaces the "v" in "over" with
"\v".  It ignores the escaped character completely.  FireFox (the little
brown-noser) does the right thing.

To fix it I forced the character by using it's ASCII/UNICODE value like so:

Chars[String.fromCharCode(11)] = "\\v";

This was an easy fix, but it's still - that seems like a pretty big, pretty
foundational bug to me.  ;^)

Jim Davis




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215844
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to