Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Funny symbol withion script

  1. #1
    Join Date
    Nov 2011
    Posts
    196
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Funny symbol withion script

    I have aquired a funny symbol when my friend sends me a file.
    He is using dreamweaver & i have frontpage & expressions web 4.
    When i upload the file to my site i see this symbol before a sign and nowhere else.

    Please advise why this is happening & what i can do to stop it.


  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,191 Times in 3,155 Posts
    Blog Entries
    12

    Default

    How is he sending the file?

    Anyways, that looks like a utf-8 encoded pound character being rendered on a page with iso-8859-1 or similar (ANSI) encoding. Try changing the encoding on the page to utf-8 via a meta tag:

    HTML Code:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    Replacing any other similar tag for a different charset. This tag should be the first meta tag in the head document, but it might not be. Once you do change or add it, make sure that it is. Make sure there is no other similar one for a different charset later in the document. That will take care of it as long as your server doesn't override it.

    Or try saving the page as iso-8859-1 or other ANSI encoded charset in your editor.

    Alternatively, you can probably just change that character to &pound; in the source code of the page and it should work in any encoding.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,933
    Thanks
    16
    Thanked 303 Times in 302 Posts
    Blog Entries
    9

    Default

    I'm 99% sure it's a character encoding thing.

    For me, I got the exact same issue on a Windows server where I couldn't use .htaccess, OR (due to other reasons) an internal meta tag to set character encoding to UTF-8. I had to cheat and set a BOM (byte order mark) at the beginning of the file which also had the effect of throwing the doc into UTF-8 mode. Depending on the way files are encoded on the server, or the web hosts editor, you can sometimes see a BOM at the start of a file looking like this  in the raw code.

    I'd need to see your page to be certain but try setting a meta tag in the head section of your web page.

    HTML 4;
    Code:
    <meta http-equiv='Content-Type' content='Type=text/html; charset=utf-8'>
    HTML 5
    Code:
    <meta charset="utf-8">
    Alternatively, you can set UTF-8 character encoding in .htaccess (not on Windows server);
    Code:
    AddDefaultCharset UTF-8
    Or if its a php file, you can set the header before any other content;
    Code:
    header('Content-type: text/html; charset=utf-8');
    If you need any more help, please post a link to your web page.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  4. #4
    Join Date
    Nov 2011
    Posts
    196
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default

    Hi
    I have possibly deleted the evidence,i mean when i seen the symbol i just deleted it from my page the uploaded the new page.
    The web page now looks ok without the symbol.
    Then i asked your advice,which was possibly the wrong way to do things.

    I can post the code here if you like ?
    I have just started to use expression web 4 within the last few days and have noticed in the code some text is highlighted yellow.
    Shall i put the code here for you to look at ?

  5. #5
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,933
    Thanks
    16
    Thanked 303 Times in 302 Posts
    Blog Entries
    9

    Default

    Ok - I pulled up your test page from a previous post and can see your strange symbol problem: ianparsons.info/ztestpage.htm

    You have 2 meta tags that look like this;
    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    Remove the second one, so there is only one in the page, and change the first one to this;
    Code:
    <meta http-equiv='Content-Type' content='Type=text/html; charset=utf-8'>
    Hopefully that will sort it out.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  6. #6
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,933
    Thanks
    16
    Thanked 303 Times in 302 Posts
    Blog Entries
    9

    Default

    I can post the code here if you like ?
    If the issue is due to something like Byte Order Mark and character encoding, posting the code/markup from your page will unfortunately not give us a full picture of what's going on. Its always best to post a live page where possible.

    I have just started to use expression web 4 within the last few days and have noticed in the code some text is highlighted yellow.
    Shall i put the code here for you to look at ?
    Presumably you mean that the software is highlighting parts of the code due to errors? I've never used Expression Web 4 so I can't really comment. By all means, post the code and indicate what is being highlighted, and we can try to help where we can.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  7. #7
    Join Date
    Nov 2011
    Posts
    196
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default

    I have supplied the code below.
    I am sure when i looked at it just now it read windows-1252 etc towards the top etc but then when i went to change it it now shows UTF-8
    I have not even done anything yet ?
    This is in expression i am looking at this.
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script type="text/javascript"><!--
    et=1375283088;function f0(d){return ld[d.getUTCDay()]+','+' '+lm[d.getUTCMonth()]+' '+d.getUTCDate()+','+' '+d.getUTCFullYear()+' at '+((d.getUTCHours()+11)%12+1)+':'+p2(d.getUTCMinutes())+':'+p2(d.getUTCSeconds())+' '+_ap(d);}
    cks={t1:{t:[{o:3600,a:'BST',d:1}],f:f0}};lm=[];lm[6]='July';ld=[];ld[1]='Monday';ld[2]='Tuesday';ld[3]='Wednesday';
    function _ap(d){var t=Math.floor(d.getTime()/1E3)%86400;if(t===0){return 'Midnight';}if(t==43200){return 'Noon';}if(t<43200){return 'AM';}return 'PM';}
    //Copyright timeanddate.com 2005-2009, do not use without permission
    
    var ltn=0;var lt0;function dt(){return new Date().getTime();}
    function gf(i){var d=document;if(d.getElementById){return d.getElementById(i);}
    if(d.all){return d.all[i];}
    return null;}
    function ih(n,h){if(n){n.innerHTML=h;}}
    function rf(i,m){ih(gf("c1"),"refresh...");setTimeout("location.reload()",Math.floor(1E3*(i+Math.random()*m)));}
    function pf(v,d){while((v="0000"+v)&&v.length<d){}return v.substring(v.length-d);}
    function p2(v){return((v<10)?"0"+v:v);}
    function upd(){var t,c,s,o,a,d,b,n=dt()+sa;if(ltn>n){rf(7,0);return;}
    ltn=n;t=Math.floor(n/1000);if(t>et){rf(10,0);return;}else{if(t!=lt0){lt0=t;for(b in cks){c=cks[b];s=c.t;o="";a="";for(var i=0;i<s.length;i++){if(s[i].t>t){break;}
    o=s[i].o;a=s[i].a;}}
    if(o!==""&&c.d1){d=new Date((t+o)*1000);ih(c.d1,c.f(d));if(c.pa!=a&&c.d2){c.pa=a;ih(c.d2,a);}}
    n=dt()+sa;}}
    setTimeout(upd,1000-(n%1000));}
    function coo(v){document.cookie='tads='+v+"; path=/";}
    function sync(w){var m,y,o,b,i,u,f,c=document.cookie,s;if(c){m=c.match(/tads\=(\d+)_(\d+)/);if(m){y=dt();o=m[1]-y;if(o>-1E4){sa=m[2]-0;upd();return;}}
    if(w<1E3&&c.indexOf('tads=c')>=0){w=w*2+10;setTimeout("sync("+w+")",w);return;}}
    coo("c");b=null;i=window;try{if(i.XMLHttpRequest){b=new XMLHttpRequest();}}catch(e){}
    if(!b){try{if(i.ActiveXObject){b=new ActiveXObject("Msxml2.XMLHTTP");}}catch(r){}}
    if(!b){try{if(i.ActiveXObject){b=new ActiveXObject("Microsoft.XMLHTTP");}}catch(a){}}
    if(!b){return;}
    try{s=dt();u=document.URL.replace(/clock.*/,"ts.php?t="+s);b.open("GET",u,true);b.onreadystatechange=function(){f=dt();if(b&&b.readyState==4&&b.status==200){sa=Math.floor(parseFloat(b.responseText)*1E3-(s+f)/2);coo(f+"_"+sa);b=null;upd();}};s=dt();b.send("");}
    catch(d){return;}}
    function init(){var a,c;lt0=0;if(typeof(cks)!=="undefined"){for(a in cks){c=cks[a];c.d1=gf(a);c.d2=gf(a+"a");c.pa="";}
    sync(0);}}//--></script><style type="text/css"><!--
    #c1 {text-align:center;display:block;margin:0px auto;background-color:transparent;padding:1px;border:none;}
    #t1c,#t1 {white-space:nowrap;font-family:Arial, Helvetica,sans-serif;font-size:28px;color:#000;font-weight:bold;text-decoration:none;}
    .t100 {width:100%;height:100%;}
    .tab {margin: 0 auto;}
    body {border:none;margin:0px;padding:0px;overflow:hidden;background-color:transparent;}
    --></style><title>Time in London</title></head>
    <body onload="init();"><table cellpadding=0 cellspacing=0 border=0 class="tab t100" id=c2><tr><td id=c1 valign=middle><a id=t1c href="http://www.timeanddate.com/worldclock/city.html?n=136" target=_blank title="clock provided by timeanddate.com"><span id=t1>Monday, July 29, 2013 at 4:21:28 PM</span></a></td></tr></table></body></html>
    Last edited by Beverleyh; 07-29-2013 at 03:35 PM. Reason: Formatting

  8. #8
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,933
    Thanks
    16
    Thanked 303 Times in 302 Posts
    Blog Entries
    9

    Default

    Can you explain why you've posted this markup? Is there still an error?

    If you're posting this in response to your previous comments about Expression Web 4 highlighting portions of code, can you indicate what you'd like us to look at exactly?

    Also, if there is still a problem, please provide a link to the live web page - I only guessed at the previous test page link but this looks different.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  9. #9
    Join Date
    Nov 2011
    Posts
    196
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default

    I have now managed to do what you advised.
    Deleted second meta tag.
    Make first tag as per your advice in post above.
    I still see the symbol.

    http://www.ianparsons.info/ztestpage.htm

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,191 Times in 3,155 Posts
    Blog Entries
    12

    Default

    Easiest thing is to just change them to:

    Code:
    &pound;
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Funny screenshots
    By keyboard in forum Picture Gallery
    Replies: 12
    Last Post: 03-13-2013, 05:33 AM
  2. Funny Code
    By keyboard in forum The lounge
    Replies: 57
    Last Post: 08-14-2012, 03:23 AM
  3. Random Content Order script Showing Symbol On Page?
    By Murray644 in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 07-31-2011, 05:28 PM
  4. Funny Stuff
    By jscheuer1 in forum The lounge
    Replies: 0
    Last Post: 11-22-2008, 06:54 PM
  5. Funny characters
    By Bornfree in forum Looking for such a script or service
    Replies: 4
    Last Post: 06-21-2007, 07:49 PM

Bookmarks

Posting Permissions

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