开发者

joomla generated page vs static html getting unknown character in transition

I have been tasked with cleaning up a very messy site, http://www.investravel.com/, built in joomla. I have first copied the entire output source to a static html file http://www.investravel.com/test.html but am getting the unknow character symbol repeated throughou开发者_高级运维t the copy in the html version.

Does anybody have any idea why that might be as I find it quite curious given they should present the same source to the browser.

It might be worth nothing there are two

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

in the original, both spelt slightly differently. I have removed both and added the correct W3C version but still to no avail.

Any help much appreciated.


I just tried saving it with firefox and it saved everything in UTF8.

The way I did it was:

Go to the "view" menu, select "Character Encoding", and make sure it has "Unicode (UTF-8)" (note that after forcing the encoding, make sure all characters are correct, I tried with that encoding and at first glance all seems right).

Then save the page as html and open it, all should be ok!

The reason your characters are wrong is probably because you had some other encoding forced, in your case I detected the Western (ISO-8859-1) encoding.


Those are encoded in the database, then they show up as the symbol once it makes it in the browser. You will notice the same thing happens with things like the copyright symbol (in the database it is &copy; but in the source it will show up as the actual symbol. You are not going to be able to make accurate copies of the pages as static HTML if they used a lot of smart quotes and other symbols.

Why would you want to take a dynamic site and make it static in the first place? That seems horribly inefficient.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜