PDA

View Full Version : RSS Reader, Content Type problem


Imagine Programming
10-22-2008, 08:46 AM
Hey all, i'm busy with a little RSS Reader, but there is a problem.

I generate an HTML page from the RSS feed, and when there is a ', " or ` in text, it shows it as �. i tried the meta tags for content type and charset, UTF-8 and i tried ISO, but i can't get the right result.

Thanks, CB


<html xmlns='http://www.w3.org/1999/xhtml'>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<meta h.t.t.p.-.e.q.u.i.v='Content-Type' content='text/html; charset=UTF-8' />
<meta name="generator" content="Imagine RSS Reader 2.0" />


This is the first part of the HTML file
h.t.t.p.-.e.q.u.i.v = the same without dots:P

Ulrich
10-22-2008, 10:58 AM
A couple of things:
DOCTYPE should be the first line of the document. It comes before the <html> tag;
Get rid of the charset=UTF-8 in the content-type directive or you will have to replace the high ASCII with the proper HTML codes... which is &acute; in this particular case.

It works correctly in my example (http://www.indigorose.com/forums/showthread.php?t=24733).

Ulrich

Imagine Programming
10-22-2008, 01:20 PM
hey upeters, thanks for the reply.

When i place the DOCTYPE on top of the document, it ignores my css style for some reason (only the font size) but i'll try to take an example of your great reader :) thanks!