tags:

views:

38

answers:

3

Hi People.

I've been asked to add a testimonial to this page...

http://www.orchardkitchens.com/Showroom/testimonials.html

As you will see there are funny characters showing up all over the place, and it has thrown the structure of the page out.

I've since reloaded the backup and the funny chars are still appearing. Any ideas what I need to do??

Please ask if you need more info from me about the problem in hand.

Many thanks,

ETFairfax.

A: 

Valid HTML might be a start; a HTML document shouldn't start with a meta tag directly. Also it seems that the charset problem is not with your web page but rather in the backend code. Look at the source, there are numerous things such as

“

appearing which are HTML character entities for things that UTF-8 encoding yields when interpreted as Latin 1. So you should probably fix your code instead of the HTML (well, that too).

Joey
I completely hear you Johannes. I didn't create this code - just been given the task of updating a little bit!!! Before I go about the task of updating the whole site, can you please help me in getting it back up and running as it was before I broke it!!!!
ETFairfax
I don't understand charsets, UTF-8 and or Latin 1, and the impact it has!!!
ETFairfax
A: 

Looks to me as though some of the text was encoded as UTF-8 yet loaded as if it were an ANSI charset then an HTML encode run over it. Resulting in these extra characters. You will need to find the source text re-build the HTML ensuring whatever is reading the source text understands that its in UTF-8 encoding.

AnthonyWJones
Basically, I opened the exiting html in notepad. Copied and modified one line of HTML, and uploaded it again via FTP. My tiny little mind assumed that would be OK. Obviously not!!Any further help appreciated!
ETFairfax
@ETFairFax: I can't see how such a simple operation would cause such a drastic change. When you say notepad we're talking windows notepad? Could be that when you got the file it was in UTF-8 but notepad didn't know that because the BOM was missing. When you posted it back it went up as an ANSI encoding and there you go the contents is trashed.
AnthonyWJones
A: 

Your HTML is syntactically invalid. The <!doctype> is missing, the <html> tag is missing, the <head> tag is missing, the meta information cannot be parsed reasonably by the webbrowser.

Fix your HTML first and then retry.

As to the character encoding story, just ensure that you're using one and same character encoding everywhere. In the datastore, in the source files, in the response headers, etcetera. You may find the introductory text of this article useful to learn a bit more about character encodings. If you actually know/use Java, then you may find the proposed solutions useful as well.

BalusC