Jump to content

Trouble With “new Look”…


Bob Blaylock

Recommended Posts

  It appears that your “New Look” is doing something incorrect with unicode characters.  Netscape and Safari (on the Macintosh) apparently are able to work around whatever is wrong, but my preferred browser, iCab, does not.  As a result, wherever characters beyond the basic ASCII set are used, they nearly always are displayed incorrectly by iCab.

 

  This all worked correctly under the “Old Look”.

 

  Here's an example:

 

BadUnicode.gif

 

  This is from my own cache, Metered Access.  Where I used proper & entities to define characters in my own HTML code, those displayed correctly, but where I included the extended characters directly, they did not.  It's really a better practice to use & entities wherever possible, anyway, and I have edited my own HTML in this listing to use them everywhere that I had previously inserted such characters directly.  However, it wouldn't let me use   (non-breaking space) in the encrypted clues; it encrypted them before sending them on, so they displayed as “&AOFC;”.

 

  The formatting of the listed coordinates in the upper left corner are outside of my control, however, and it appears that the degree symbol is being sent directly, and is being corrupted in the manner that I have described.

 

  There also appear to be major errors in HTML syntax throughout the site.  Here's what BBEdit's HTML checking feature has to say about the home page at http://www.geocaching.com/:

 

File "http://geocaching.com/"; Line 2:  Document type doesn't permit empty XML element; “<link/>”.

File "http://geocaching.com/"; Line 2:  Element “<script>” requires that the attribute “type” be specified.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit attribute “leftmargin” within element “<body>”.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit attribute “topmargin” within element “<body>”.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit attribute “marginwidth” within element “<body>”.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit attribute “marginheight” within element “<body>”.

File "http://geocaching.com/"; Line 3:  Value of attribute “width” for element “<table>” is invalid; Value must be enclosed in quotes.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit attribute “height” within element “<table>”.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 3:  URI attribute value for attribute “href” is empty.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 3:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 9:  Close tag for element “</a>” omitted but document type doesn't permit it.

File "http://geocaching.com/"; Line 11:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 12:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 16:  Document type doesn't permit attribute “background” within element “<td>”.

File "http://geocaching.com/"; Line 19:  Document type doesn't permit attribute “height” within element “<table>”.

File "http://geocaching.com/"; Line 21:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 23:  Document type doesn't permit empty XML element; “<img/>”.

File "http://geocaching.com/"; Line 30:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 35:  Document type doesn't permit attribute “height” within element “<table>”.

File "http://geocaching.com/"; Line 38:  Value of attribute “bgcolor” for element “<td>” is invalid; Value must be enclosed in quotes.

File "http://geocaching.com/"; Line 45:  Document type does not permit element “<form>” in content of element “<tr>”.

File "http://geocaching.com/"; Line 46:  Document type does not permit element “<td>” in content of element “<form>”.

File "http://geocaching.com/"; Line 54:  Close element “</form>” found but element wasn't open.

File "http://geocaching.com/"; Line 60:  Document type does not permit element “<form>” in content of element “<tr>”.

File "http://geocaching.com/"; Line 60:  Value of attribute “action” for element “<form>” is invalid; Value must be enclosed in quotes.

File "http://geocaching.com/"; Line 61:  Document type does not permit element “<td>” in content of element “<form>”.

File "http://geocaching.com/"; Line 63:  Document type doesn't permit attribute “60px;” within element “<select>”.

File "http://geocaching.com/"; Line 63:  Document type doesn't permit attribute “width:” within element “<select>”.

File "http://geocaching.com/"; Line 68:  Document type does not permit element “<td>” in content of element “<form>”.

File "http://geocaching.com/"; Line 70:  Close element “</form>” found but element wasn't open.

File "http://geocaching.com/"; Line 76:  Document type does not permit element “<form>” in content of element “<tr>”.

File "http://geocaching.com/"; Line 76:  Value of attribute “action” for element “<form>” is invalid; Value must be enclosed in quotes.

File "http://geocaching.com/"; Line 77:  Document type does not permit element “<td>” in content of element “<form>”.

File "http://geocaching.com/"; Line 79:  Document type doesn't permit attribute “60px;” within element “<select>”.

File "http://geocaching.com/"; Line 79:  Document type doesn't permit attribute “width:” within element “<select>”.

File "http://geocaching.com/"; Line 84:  Document type does not permit element “<td>” in content of element “<form>”.

File "http://geocaching.com/"; Line 105:  Element “<p>” implicitly closed here.

File "http://geocaching.com/"; Line 121:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 121:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 123:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 132:  Close element “</a>” found but element wasn't open.

File "http://geocaching.com/"; Line 141:  Close element “</a>” found but element wasn't open.

File "http://geocaching.com/"; Line 150:  Close element “</a>” found but element wasn't open.

File "http://geocaching.com/"; Line 159:  Close element “</a>” found but element wasn't open.

File "http://geocaching.com/"; Line 168:  Close element “</a>” found but element wasn't open.

File "http://geocaching.com/"; Line 176:  Unencoded entity found; “&” needs to be encoded as “&”.

File "http://geocaching.com/"; Line 177:  Close element “</a>” found but element wasn't open.

File "http://geocaching.com/"; Line 186:  Close element “</a>” found but element wasn't open.

File "http://geocaching.com/"; Line 195:  Close element “</a>” found but element wasn't open.

File "http://geocaching.com/"; Line 204:  Close element “</a>” found but element wasn't open.

File "http://geocaching.com/"; Line 213:  Close element “</a>” found but element wasn't open.

File "http://geocaching.com/"; Line 226:  Document type doesn't permit attribute “height” within element “<table>”.

File "http://geocaching.com/"; Line 228:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 241:  Document type doesn't permit attribute “height” within element “<table>”.

File "http://geocaching.com/"; Line 243:  Value of attribute “bgcolor” for element “<td>” is invalid; Value must be enclosed in quotes.

File "http://geocaching.com/"; Line 258:  Document type doesn't permit attribute “height” within element “<table>”.

File "http://geocaching.com/"; Line 260:  Value of attribute “bgcolor” for element “<td>” is invalid; Value must be enclosed in quotes.

File "http://geocaching.com/"; Line 263:  Element “<script>” requires that the attribute “type” be specified.

File "http://geocaching.com/"; Line 272:  CDATA section terminated unexpectedly.

File "http://geocaching.com/"; Line 272:  Unknown or malformed close element: “</ifr'+'ame>”.

File "http://geocaching.com/"; Line 275:  Unknown or malformed close element: “</'+'scr'+'ipt>”.

File "http://geocaching.com/"; Line 278:  Close element “</a>” found but element wasn't open.

File "http://geocaching.com/"; Line 280:  Unknown or malformed close element: “</ifr'+'ame>”.

File "http://geocaching.com/"; Line 284:  Value of attribute “target” for element “<a>” is invalid; Frame target must be one of {“_blank”,“_self”,“_parent”,“_top”} or start with an alphabetic character and be properly entity encoded.

File "http://geocaching.com/"; Line 285:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 296:  Element “<img>” requires that the attribute “alt” be specified.

File "http://geocaching.com/"; Line 308:  Document type doesn't permit attribute “height” within element “<table>”.

File "http://geocaching.com/"; Line 310:  Value of attribute “bgcolor” for element “<td>” is invalid; Value must be enclosed in quotes.

File "http://geocaching.com/"; Line 314:  Element “<p>” implicitly closed here.

File "http://geocaching.com/"; Line 318:  Close element “</p>” found but element wasn't open.

File "http://geocaching.com/"; Line 320:  Element “<p>” implicitly closed here.

File "http://geocaching.com/"; Line 324:  Close element “</p>” found but element wasn't open.

File "http://geocaching.com/"; Line 326:  Element “<p>” implicitly closed here.

File "http://geocaching.com/"; Line 330:  Close element “</p>” found but element wasn't open.

File "http://geocaching.com/"; Line 365:  URI attribute value for attribute “href” is empty.

File "http://geocaching.com/"; Line 366:  Unencoded entity found; “&” needs to be encoded as “&”.

File "http://geocaching.com/"; Line 367:  Document type does not permit element “<p>” in content of element “<font>”.

File "http://geocaching.com/"; Line 376:  Close element “</font>” found but element wasn't open.

File "http://geocaching.com/"; Line 377:  Close element “</td>” found but element wasn't open.

File "http://geocaching.com/"; Line 377:  Close element “</tr>” found but element wasn't open.

File "http://geocaching.com/"; Line 377:  Close element “</tbody>” found but element wasn't open.

File "http://geocaching.com/"; Line 377:  Close element “</table>” found but element wasn't open.

Edited by Bob Blaylock
Link to comment

Most borwsers have a setting for encoding, and some let you tailor it to specific pages. In IE you can right click a page and slect encoding AUTO and it will make the page display based on their sites encoding, if they set it up that way. Or you can pick one listed. I dont use iCab so I dont know if this feature is listed, but you might want to look further into your browsers functions. Selecting somehting different than the default browsers settings should rectify your problem.

 

Hope that solves your problems in displaying the page correctly.

 

Also, most sites that do coding checks are outdated by what modern browsers look for. There are coding defaults for html and web design standards, but that is because they never intended them to be used in loose terms. They wanted a standard rule but they are hardly ever followed.With home made scripts and server side translation, there are so may things to check for that could throw off an html validator. WWC3 website lists most any site as having coding issues, but its all in what !DOCTYPE html PUBLIC "-//W3C//DTD.... tag they use and then what form of coding they implement that conflicts with the doc-type declatations. This will usually cause site validation problems, because a lot of new sites use php and server side tags such as xml that write into the pages html, and they are an added way of coding that is usually going to throw off html validaters. How the server scripts it on their side may be different than what shows up under a view-source. Also, most browsers tends to be smarter than html validators in strict encoding and !DOCTYPE declarations. They were designed with this in mind so as to be the "better browser" in getting people to use their version when they can display and translate just about any method of html.

Link to comment

  I have just discovered that the “Printer Friendly” version of a cache page displays correctly under iCab, even though the non–“Printer Friendly” version does not.  I've spent a bit of time trying to figure out what the difference is, and have yet to come to any useful conclusion.  I did determine that the same two bytes are sent in each version for a degree symbol [C2 B0] which correctly display on the printer-friendly page as a degree symbol, but which display on the non-printer-friendly page as a  followed by a degree symbol.

 

  I'll have to try some other things later.  It's probably something elsewhere in the page that tells the browser what character encoding to use.

Link to comment
It's probably something elsewhere in the page that tells the browser what character encoding to use.

Exactly correct.

 

The regular page has this near the top:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

The printer-friendly page has no content type specified.

 

While developing the latest version of Spinner (in beta test now), I have determined the most effective setting is:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

This is an international sport, and thus a lot of international characters end up in the cache description. Specifying a US character set, such as the cache page now does, causes problems for international users.

 

I highly recommend specifying the UTF-8 content type.

 

I also recommend using ° for the degree symbol in the coordinates. Using the un-entitized version is technically illegal, and as already pointed out, it does not render properly on some browsers.

Link to comment
It's probably something elsewhere in the page that tells the browser what character encoding to use.

Exactly correct.

 

The regular page has this near the top:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

The printer-friendly page has no content type specified.

 

While developing the latest version of Spinner (in beta test now), I have determined the most effective setting is:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

This is an international sport, and thus a lot of international characters end up in the cache description. Specifying a US character set, such as the cache page now does, causes problems for international users.

 

I highly recommend specifying the UTF-8 content type.

  That seems to be exactly the problem.  If save the source to my hard drive, and change the type to UTF-8, and load it in my browser, it displays correctly.  If I remove that tag entirely, it displays incorrectly until I manually tell my browser to display it using UTF-8 encoding.

 

  Apparently, iCab will allow you to manually specify what encoding to use if the page doesn't specify, but if the page specifies an encoding, then iCab will not override that.

 

  Jeremy, are you reading this thread?

 

  In all the “new look” pages, please change this tag…

 

     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

 

  …to this…

 

     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

 

  This will apparently correct the display problems that I am having with iCab.

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...