KBD

Keith Devens .com

Sunday, October 12, 2008 Flag waving
Civilization advances by extending the number of important operations which we can perform without thinking about them. – Alfred North Whitehead (Introduction to Mathematics)
← RATEThermodynamics vs. Evolutionism →

Daily link icon Friday, August 22, 2003

No more invalid RSS feeds for me

Hey, sometimes when I copy text from other places on the web and paste them into a weblog post, I wind up with characters in my RSS feed that Microsoft's XML parser chokes on. I always thought Microsoft's XML parser was stupid (Mozilla's would usually work fine, for example). However, as I recently copied text that contained non-ASCII characters and was manually changing them to their ASCII equivalents like I usually do, my recent foray into learning everything about character encodings paid off because I finally realized what was happening.

It turns out I declare my RSS feed to be UTF-8, but those special characters I always paste are probably all Latin-1, and while Unicode shares code points with ASCII, it doesn't share them with Latin-1. I also discovered that PHP has a handy UTF8_encode function that I was able to stick in where I generate my RSS file, and now everything is happy. I should also check out PHP's multi-byte string functions.

← RATEThermodynamics vs. Evolutionism →

Comments XML gif


Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

October 2008
SunMonTueWedThuFriSat
 1234
567891011
12131415161718
19202122232425
262728293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 8 posts

Recent comments XML

new⇒URL design

http://groups.google.com/group/cool​ndex/web/asian-girl-sucking-to-blac​k-man...

derek: Oct 12, 12:13pm

I hate PHP

Elliot Anderson,

Dude!! You the​man! The reverse replacement for​array_u...

Alex Ndungu: Oct 11, 1:35am

Call a function from a string in Python

?!code:
some_object.__getattribute​__('method_name')()
?!/code

is​the s...

Patrick Corcoran: Oct 8, 3:53pm

Spider solitaire

I have won 185 games of Spider​Solitaire at the "Difficult" level.​ What is...

75.179.28.113: Oct 8, 12:42pm

Sed one-liners

Hi.

I wanted to let you know​that I wrote an article "Famous Sed​One-Lin...

Peteris Krumins: Oct 8, 3:05am

Timesheet Calculator

Hadn't seen it before now, but my​company already uses a time​tracking prog...

Keith: Oct 7, 10:44am

Girls, please don't get breast implants

Hey everyone, 

I am new to this​blog and I have enjoyed reading all​your...

Sarah.M.: Oct 6, 9:45am

Generated in about 0.188s.

(Used 8 db queries)

mobile phone