Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,033
    Thanks
    0
    Thanked 248 Times in 245 Posts

    Internet Explorer 'Expected hexadecimal digit' error

    ive got these lines in my script and IE generates the 'Expected hexadecimal digit' error:

    str += '<NOBR>&nbsp;User name:\n';
    str += "&lt;&gt;&quot;\'&amp;\\user\n"; // <>"'&\user


    But when the username has no word 'user' at the end, it's ok:

    str += '<NOBR>&nbsp;User name:\n';
    str += "&lt;&gt;&quot;\'&amp;\\\n"; // <>"'&\

    it's weird! anyone knows the cause?

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,033
    Thanks
    0
    Thanked 248 Times in 245 Posts
    Originally posted by adios
    http://msdn.microsoft.com/library/de...cimaldigit.asp

    Escape something (I'd guess).
    thanks adios!

    i followed the link, and in the Note section it says:

    Note If you want to use the literal text \u in a string, then use two backslashes - (\\u) - one to escape the first backslash.

    I already did it, didn't I?

    str += "&lt;&gt;"'&\\user\n";

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    ...not following your use of quotes here:

    str += "&lt;&gt;"'&\\\n";

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,033
    Thanks
    0
    Thanked 248 Times in 245 Posts
    Originally posted by adios
    ...not following your use of quotes here:

    str += "&lt;&gt;"'&\\\n";

    ok here it is again, sorry for the wrong posts earlier.
    i was confused with all the special chars

    str += "&lt;&gt;&quot;\'&amp;\\user\n";

    Edit:
    this forum escapes the entities i typed;
    here it is again, hope it's now correct...

    str += "&amp;lt;&amp;gt;&amp;quot;\'&amp;amp;\\user\n";


  • #6
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    I recently sweated over some string-wrangling regex code and the escaping issue nearly did me in (\\\\\\/ - does that fly?). How 'bout....

    str += '&lt;&gt;"\'&\\user\n';

    Just getting vBulletin to render this stuff is a challenge...

    Edit: why don't I just give you my phone number & you can describe it to me....


    [yetanotheredit]document.wrote that string and - it's fine! No errors...[yetanotheredit]
    Last edited by adios; 08-02-2002 at 03:52 AM.

  • #7
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,033
    Thanks
    0
    Thanked 248 Times in 245 Posts
    i took the screenshot of the lines, it's difficult to getting vBullettin to render the correct code (sigh!).

    I cannot immediately changed the string value because it is generated on the server-side (the code is in C), only the string delimeter. I changed it to single quote but still the same error occurs.
    Attached Thumbnails Attached Thumbnails 'Expected hexadecimal digit' error-hexa.jpg  

  • #8
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,033
    Thanks
    0
    Thanked 248 Times in 245 Posts
    i have fixed the problem, i didn't realize there are other lines that had the \u which caused the error.
    thanks adios for the time and for reminding me that there is such an error in IE.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •