Forum Moderators: phranque

Message Too Old, No Replies

Web Pages Show As Text Only

         

bluegrassmedia

1:42 pm on Feb 28, 2015 (gmt 0)

10+ Year Member



I've been building a website using MS word and I finished all the pages and they all look fine when I open them in a browser locally but after I upload them to my host and try to access them over the web the pages load as plain text and even sometimes in chinese! See here [snip]

The pages still look fine if I open them locally. I've never encountered this problem before. Any ideas?

[edited by: phranque at 1:47 am (utc) on Mar 1, 2015]
[edit reason] no site reviews, please [/edit]

phranque

1:49 am on Mar 1, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, bluegrassmedia!


have you tried checking your response headers to make sure the Content-Type header is specified as text/html?
is there any chinese text in the document/resource generated by MS.

lucy24

2:35 am on Mar 1, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Open the files in a text editor that shows invisible text. I suspect there's a BOM near the beginning, playing havoc with everything that comes after it. Generally things don't turn into Chinese unless something has encouraged the browser to expect UTF-16 content.

bluegrassmedia

5:50 am on Mar 1, 2015 (gmt 0)

10+ Year Member



Ok, I fixed it.

SOMEHOW the encoding was changed to UCS-2. I changed it back to UTF-8 in notepad++ and it's all good now.