[SoCoSA/discuss] wierd dash character

Eric Eisenhart eric at nblug.org
Thu May 22 19:08:54 PDT 2008


It's likely that before the upgrade your server was sending a  
different (correct) character set, not that it was actually converting.

The diamond with a question mark is the "I don't know what this  
character is" or "I don't have this character in my font" indicator.

If you can, try one of these against both the old server and the new  
(change URL, of course):
HEAD http://www.example.com/foo.html
curl -I http://www.example.com/foo.html
wget -S -O /dev/null http://www.example.com/foo.html

Look at the "Content-Type" header.  It's probably something like  
"Content-Type: text/html; charset=utf-8" or "Content-Type: text/html;  
charset=iso-8859-1".

You can put "AddDefaultCharset ISO-8859-1" or "AddDefaultCharset  
UTF-8" into your apache configuration to switch to the other behavior,  
or you can put one of these into the <head> of your HTML files:
<meta http-equiv="Content-Type" content="text/html;  
charset=iso-8859-1"  />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

I believe apache will actually read that meta out and pass it in the  
HTTP headers.

There's lots of other charset options out there, iso-8859-1 and utf-8  
are simply the most likely (other than "us-ascii, which doesn't have  
the funky characters that seem to be causing you problems)

On May 22, 2008, at 6:51 PM, gandalf at sonic.net wrote:

> I have a weird dash character that is causing problems on web pages.  
> It's showing up as a diamond with a question mark in browsers. In a  
> GUI text editor it shows up as a dash. In vi and less it shows up as  
> <97>. In cat and more it does not show at all. I can't seem to grep  
> for it as I can't seem to figure out what it is. I guess I could  
> write perl code to bring it up with the text around it in a reg exp  
> and then see what the ascii value is or something. I'm not sure how  
> I ended up with these. I'm suspicious that is' the long dash from MS- 
> Word or something.
>
> I'm almost certain these were not visible before we upgraded our  
> server. Perhaps the old apache had a built in conversion for them.
>
>
> "There probably isn't any meaning in life. Perhaps you can find  
> something interesting to do while you are alive." - Orochimaru  
> (Naruto)
>
>
>
>
> _______________________________________________
> SoCoSA discuss mailing list
> discuss at socosa.org
> Your address: freiheit at socosa.org
> http://socosa.org/mailman/listinfo/discuss
> http://socosa.org/mailman/options/discuss/freiheit%40socosa.org
>




More information about the discuss mailing list