|
2007-01-09, 07:27 AM | #1 |
Mean people suck, nice people swallow, are you mean or nice?
|
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? |
2007-01-09, 09:29 AM | #2 |
That which does not kill us, will try, try again.
|
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.
__________________
"If you're happy and you know it, think again." -- Guru Pitka |
2007-01-09, 11:56 AM | #3 |
Mean people suck, nice people swallow, are you mean or nice?
|
Thanks Simon. I used this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> and <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 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? Last edited by Licker4U; 2007-01-09 at 12:34 PM.. |
2007-01-09, 04:15 PM | #4 |
That which does not kill us, will try, try again.
|
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: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "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.
__________________
"If you're happy and you know it, think again." -- Guru Pitka |
2007-01-09, 04:28 PM | #5 | |
Mean people suck, nice people swallow, are you mean or nice?
|
Quote:
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: <FORM> <FONT FACE="Arial, Helvetica" SIZE="4"> <TEXTAREA ROWS="4" COLS="50"> The following pages contain sexually oriented yada, yada......</textarea></form> |
|
2007-01-09, 04:37 PM | #6 |
That which does not kill us, will try, try again.
|
Okay, there's the problem.
- Element “<form>” requires that the attribute “action” be specified. - Close tag for element “</font>” 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: <form action="empty"> 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.
__________________
"If you're happy and you know it, think again." -- Guru Pitka |
2007-01-09, 05:07 PM | #7 |
Mean people suck, nice people swallow, are you mean or nice?
|
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?
|
2007-01-09, 05:35 PM | #8 |
That which does not kill us, will try, try again.
|
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.
__________________
"If you're happy and you know it, think again." -- Guru Pitka |
2007-01-09, 07:58 PM | #9 |
Shut up brain, or I'll stab you with a Q-tip!
|
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. |
2007-01-09, 08:23 PM | #10 | |||
Mean people suck, nice people swallow, are you mean or nice?
|
Quote:
Quote:
Quote:
|
|||
2007-01-09, 10:50 PM | #11 | |
Madness is like gravity. All it takes is a little... push.
Join Date: Feb 2006
Location: California
Posts: 1,679
|
Quote:
I'm a straight up text link recip submitter - have been from the start. I highly recommend it. Probably best to talk to your host about the httpd.conf file. It's one of those Apache configuration files.
__________________
~Warm and Fuzzy. |
|
2007-01-10, 09:44 PM | #12 |
Shut up brain, or I'll stab you with a Q-tip!
|
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.
|
|
|