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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Nov 2007
    Posts
    108
    Thanks
    14
    Thanked 0 Times in 0 Posts

    FF (and IE) has "illegal character" error in Error Console

    Strange problem here... I'm implementing google's JS tracking code verbatim which determines whether or not the current site is using HTTP or HTTPS. It builds a dynamic URL used as the "SRC" parameter in the SCRIPT statement.

    On browsers I'm testing with(FF, IE, Chrome) there's no problem running the code.

    However, there are some people in the office who get an FF or IE error (same versions as mine) on the URL as the SRC parameter. The error, in the FF Error Console, is this:

    illegal character
    http://www.google-analytics.com/ga.js
    ? ? ? ? --> question marks appear in console
    I can't figure it out since I can't create this error on any of my browsers.

    Could this be related to something like browser security settings or add-ons?

  • #2
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Google analytics and illegal character on Firefox SOLVED

    Quote Originally Posted by loamguy1 View Post
    However, there are some people in the office who get an FF or IE error (same versions as mine) on the URL as the SRC parameter.
    I had the same problem, and the reason was that the page was saved using encoding utf-16 while it should be utf-8. You can check the encoding by viewing page info by hitting CMD+i (on a Mac).

    Here is an example of wrong encoding (while writing this):



    Save the file with utf-8 and it will work.

    I think this is Google's or Firefox's bug. On IE and Safari it seems to work even with utf-16.

  • #3
    Regular Coder
    Join Date
    Nov 2007
    Posts
    108
    Thanks
    14
    Thanked 0 Times in 0 Posts
    Thanks for the post. Unfortunately, the encoding is correctly being saved as UTF-8, but the problem still exists in office computers (IE, FF).


  •  

    Posting Permissions

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