Use the Right Encoding


Don't forget that RSS feeds are XML documents. Among other things, this means that if you use characters in your RSS feeds that are not in the default character set, which is UTF-8 (see http://www.utf-8.com), you have to use a different encoding. If, for example, you wanted to write your RSS feed in a language with another character set, such as Japanese, you would have to use the appropriate encoding. You specify the XML encoding in the XML declaration of the RSS feed:

         <?xml version="1.0" encoding="UTF-8" ?>    <!DOCTYPE rss SYSTEM     "http://my.netscape.com/publish/formats/rss-0.91.dtd">    <rss version="0.91">            .            .            .    </rss> 


For the legal encodings you can use with RSS, see Table 4.1 in Chapter 4, "Creating RSS Feeds from Scratch."



Secrets of RSS
Secrets of RSS
ISBN: 0321426223
EAN: 2147483647
Year: 2004
Pages: 110

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net