Forum Moderators: coopster
I use an accented character replace function before I input to my db.
from user comments here
[ca.php.net...]
function removeaccents($string){
return strtr(
strtr($string,
'ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝàáâãäåçèéêëìíîïñòóôõöøùúûüýÿ',
'SZszYAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy'),
array('Þ' => 'TH', 'þ' => 'th', 'Ð' => 'DH', 'ð' => 'dh', 'ß' => 'ss',
'Œ' => 'OE', 'œ' => 'oe', 'Æ' => 'AE', 'æ' => 'ae', 'µ' => 'u'));
}
that might help
could it be ö?
I don't think it can be that because I'm pretty sure I don't have any of these in my db. What I do have is lots of " and a few boxy things which are invisible on the actual page itself and in the db. Here is exactly what the validator said...
Line 318, column 462: non SGML character number 148...urn to base warranty">Space-saving 21¼/strong>” LCD Television with its own built-in
At first I thought it was the " marks, but I have them all over the place and they don't cause errors with every page. When I try to print the boxy thing here, you'll notice it has been replaced by a #148 - telling huh?
If I look at the source code of the page itself I can see that the boxy thing has replaced the " in some cases only, but not others.
If I could see the boxy thing on the page or in the db, I would just remove it by hand, but the " in the db all look the same to me, but obviously some of them are turning themselves into boxy things.
Confused.
H.
If that's the case then you might want to try
<META http-equiv="Content-type" content="text/html; charset=UTF-8">
<META http-equiv="Content-type" content="text/html; charset=UTF-8">
Sorry, I am unable to validate this document because on lines 318, 321, 324 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). Please check both the content of the file and the character encoding indication.
Also, if anyone has any other thoughts or ideas about this, please post them, even if it is just something to try. Other people must have come across this type of thing before, no?
Cheers,
H.
You using Access XP?
<META http-equiv="Content-type" content="text/html; charset=unicode">
Sorry! A fatal error occurred when attempting to transcode the character encoding of the document. Either we do not support this character encoding yet, or you have specified a non-existent character encoding (often a misspelling). The detected character encoding was "unicode".
The error was "".
If you believe the character encoding to be valid you can submit a request for that character encoding (see the feedback page for details) and we will look into supporting it in the future.
Please keep those suggestions coming!
If I put in a normal double quotation mark - " - " " into the db, this is fine.
The ones causing problems are the right double quote - ” - ”
So I have just done a find and replace for all of them in my db, uploaded it and everything is rosy :)
The only thing to worry about is that in a font like arial, the double quote and right double quote both look the same :/
But I have now set notepad to times new roman (that'll be fun when coding) so I can spot the evil quotes right away before I put them in the db :)
If you declare your charset as Windows-1252 or you convert your underlying data in the DB to Unicode and declare your charset as UTF-8 you should be fine.
Tom