View Full Version : inline encoding
01-08-2010, 05:29 PM
Most of my document's data is iso-8859-1 character encoding however some data that comes from an rss feed is UTF-8. Is there a way to change the encoding of an html document half way through so that most the data is iso-8859-1 but the news is UTF-8? Any ideas?
01-08-2010, 05:32 PM
Do you have any issue if you use UTF-8 at the top instead of your current one?
01-08-2010, 05:48 PM
Yes the other data displays properly only if ISO-8859-1 is set at top. However the news feed data only displays properly if UTF-8 is set at top
01-09-2010, 06:51 AM
Yes the other data displays properly only if ISO-8859-1 is set at top. However the news feed data only displays properly if UTF-8 is set at topThen you want your all data (UTF-8 and ISO-8859-1) work properly in the same page?
as far as i now work with 2 different encoding charset in 1 page still not accepted by existing browser, but i hope browser development pierce it.
but if you can handle with auto switch encoding charset, i was post it at http://www.codingforums.com/showthread.php?t=186062
& maybe you can fix it using file_get_contents /php get file (or get url) then input to one page. e.g.
<textarea rows="20" cols="50">
echo htmlspecialchars($str, ENT_COMPAT, $charset); ?>
or similar to it. note: i not tested it yet
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.