Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can (and probably should) include the charset in your <code>Content-Type</code> header. Also, I've never seen the content type <code>rss-http</code>, I'd use either <code>text/xml</code> or <code>application/xml</code>. There also a few more specific content types, but <a href="http://www.petefreitag.com/item/381.cfm" rel="nofollow">there might be some issues with this</a>. RSS <em>is</em> xml, so either generic xml content type will work fine. </p> <pre><code>header("Content-Type: text/xml; charset=ISO-8859-1"); </code></pre> <p><code>ISO-8859</code> does include Cyrillic characters, but that <em>may</em> not be the charset your data is stored in <a href="http://czyborra.com/charsets/cyrillic.html" rel="nofollow">here is a reference for various other Cyrillic charsets that are in-use</a>. In any case, you should probably specify the same encoding that you're using in your mysql database. You can use <code>show create table your_table_name</code> in mysql to see what the charset is for a given table (or for an individual column in the table).</p> <p>Also... the description field in RSS will be handled as HTML <em>after</em> the user agent extracts if from the XML document. For this reason, I <em>strongly</em> suggest that you wrap the content of your item description as CDATA. Even so, you'll still need to entity encode things that you would normally entity encode in HTML text (like a "less-than" symbol that's not part of an html tag). <a href="http://cyber.law.harvard.edu/rss/encodingDescriptions.html" rel="nofollow">Here's a good example page</a>.</p> <pre><code>&lt;description&gt;&lt;![CDATA[(5 &amp;lt; 8) is math, but &lt;b&gt;this is bold text&lt;/b&gt;]]&gt;&lt;/description&gt; </code></pre> <p>Notice how the HTML <code>&lt;b&gt;</code> tags don't need encoding because they're inside the CDATA, but the less-than symbol gets encoded anyway to escape it within the other HTML tags in the CDATA description. Without the CDATA, you'd need to xml-encode the contents of the description tag - which will require that the less-than in the above example actually be "double-encoded". (so just use the CDATA, it's much easier and less error-prone).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload