cardmagic / simple-rss

A simple, flexible, extensible, and liberal RSS and Atom reader for Ruby. It is designed to be backwards compatible with the standard RSS parser, but will never do RSS generation.
https://github.com/cardmagic/simple-rss
Other
225 stars 68 forks source link

UTF-8 Regex In rails 3, ruby 1.9.2 #2

Closed kpitn closed 14 years ago

kpitn commented 14 years ago

Hi, I have this problem : /home/pierre/.rvm/gems/ruby-1.9.2-rc2/gems/simple-rss-1.2.3/lib/simple-rss.rb:155: warning: regexp match /.../n against to UTF-8 string

with this code :

file = Net::HTTP.get(URI.parse('http://feeds.feedburner.com/Model-rc'))

coder = HTMLEntities.new file = coder.decode(file.force_encoding('UTF-8'))

@rss = SimpleRSS.parse(file)

any idea ?

cardmagic commented 14 years ago

This is only a warning, not an error, so you should not worry about it. However I have added UTF8 support for the regex.

[master ef0d5db] Adding support for regex of UTF8 characters

kpitn commented 14 years ago

Thank you !