Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   General Business Knowledge (http://www.greenguysboard.com/board/forumdisplay.php?f=10)
-   -   What charset am I using? (http://www.greenguysboard.com/board/showthread.php?t=37387)

Licker4U 2007-01-09 07:27 AM

What charset am I using?
 
I went here: http://validator.w3.org/ to validate a page and it said

"Sorry, I am unable to validate this document because on line 120 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding".

I don't have any Character Encoding specified so how and where do I specify that? Also, how can I find line 120?

Simon 2007-01-09 09:29 AM

http://validator.w3.org/docs/help.html#faq-doctype

http://validator.w3.org/docs/help.html#faq-charset

And if you turn off word-wrapping in your text editor, you can just open the html page and count down to line 120. Unless your text editor provides line counts, and then you can use that to go right to that line.

Licker4U 2007-01-09 11:56 AM

Thanks Simon. I used this:



and



but got 8 errors. It didn't like my topmargin, background,s bordercolordarks, bordercolorlights and form (for my warning)

If "charset=iso-8859-1" is the wrong charset, which one should I use?

Simon 2007-01-09 04:15 PM

I don't think it has anything to do with your character set. What you're using (iso-889-1) is pretty standard.

It's really your DOCTYPE that stands up and calls out what standards *you* are saying that you're following. Regarding DOCTYPE, I'd suggest using this intead of the HTML 4.0 one you're using now:

"http://www.w3.org/TR/html4/loose.dtd">

Now, about those errors...

- topmargin is/was an IE-only attribute and is deprecated in favor of using css to control margins.

- background is also deprecated and the image should be spec'd in css.

- bordercolordarks, bordercolorlights only work in IE and Microsoft even suggest you don't use them any more.

- form: this one may have more to do with how you're using the form tag but I'd have to see your page to be sure.

A guide to which tags have been deprecated is here.

Licker4U 2007-01-09 04:28 PM

Quote:

Originally Posted by Simon (Post 324310)

"http://www.w3.org/TR/html4/loose.dtd">

Thanks, I'll try that. The bordercolordark and bordercolorlight are in recips from link lists. Not much I can do about that.

I can use CSS for everything else.

The form is used at the beginning of my warning message. Pust it in a nice little scrollable box:




Simon 2007-01-09 04:37 PM

Okay, there's the problem.

- Element “
” requires that the attribute “action” be specified.

- Close tag for element “” omitted but document type doesn't permit it.

You really should get all the font tags out and stick that in your css too anyway. For the form tag you can use something like this:



I put the word 'empty' in there because if I leave it empty I get an error telling me the form action is empty. So that's just my little workaround for avoiding the error. In this kind of usage, the form is not being used as designed -- in an interactive manner -- so the action really doesn't matter. You just need something there if you want the code to validate.

Licker4U 2007-01-09 05:07 PM

Thanks Simon, that took care of everything. The bordercolor thing is in the recip's from some link lists. When I validate they show up as problems. That won't affect anything will it?

Simon 2007-01-09 05:35 PM

You've just found one more good reason to begin working on making your own custom recips tables. Not only will you be able to submit each version of your free site to more link lists, but you won't need to use any of those attributes anymore.

Aside from that you just have to accept that you have those pieces of code that don't validate, but you know your page is good code except for those bits.

RamCharger 2007-01-09 07:58 PM

Just a few quick comments:
Be careful and look in your httpd.conf at what charset you have it set to. I ran in to a case with my site where I had it set to UTF-8 and it actually had a higher precedence (or at least conflicted) with the iso-8859-1 that I had in my meta tags. The validator picked that up on my site when it was happening.

Also, about iso-8859-1: be careful when you compose pages that you give some thought if you hope to maintain compatibility with it. iso-8859-1 does have some special chars which you might overlook when writing you html with a text editor (I know I have). These chars are: & which needs to be & in your html, ' needs to be " and a few others that you need to be aware of. If you're using php for text output you can use htmlspecialchars (http://us2.php.net/manual/en/functio...ecialchars.php) to take care of the encoding for you.

Licker4U 2007-01-09 08:23 PM

Quote:

Originally Posted by Simon (Post 324331)
Aside from that you just have to accept that you have those pieces of code that don't validate, but you know your page is good code except for those bits.

Yeah, as long as my page shows up properly, if a link list has a recip table that won't validate, the burden is on him/her.

Quote:

Originally Posted by RamCharger (Post 324355)
Be careful and look in your httpd.conf at what charset you have it set to.

Where do I find httpd.conf?

Quote:

Originally Posted by RamCharger (Post 324355)
Also, about iso-8859-1: be careful when you compose pages that you give some thought if you hope to maintain compatibility with it. iso-8859-1 does have some special chars which you might overlook when writing you html with a text editor (I know I have). These chars are: & which needs to be & in your html, ' needs to be " and a few others that you need to be aware of. If you're using php for text output you can use htmlspecialchars (http://us2.php.net/manual/en/functio...ecialchars.php) to take care of the encoding for you.

I always use & and other special characters if I want that character to actually show up on the page so I think I'm OK with that.

virgohippy 2007-01-09 10:50 PM

Quote:

Originally Posted by Licker4U (Post 324361)
Yeah, as long as my page shows up properly, if a link list has a recip table that won't validate, the burden is on him/her.

Sometimes the errors are so bad I'm surprised my browser doesn't blow up! |banghead|

I'm a straight up text link recip submitter - have been from the start. I highly recommend it. |thumb

Probably best to talk to your host about the httpd.conf file. It's one of those Apache configuration files.

RamCharger 2007-01-10 09:44 PM

Quote:

Originally Posted by Licker4U (Post 324361)
Where do I find httpd.conf?

You only need to worry about that file if you own the box. If you're using a host then you don't (and won't) have access to it.


All times are GMT -4. The time now is 03:10 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc