Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: JRuby 0.9.8, JRuby 0.9.9, JRuby 1.0.0RC1, JRuby 1.0.0RC2
-
Fix Version/s: JRuby 1.0.0RC3
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:JRuby trunk between 13/04/07 and 15/04/07, java 1.6, Ubuntu 2.6.20-14-generic
-
Testcase included:yes
-
Number of attachments :
Description
Try the following both in irb and then in jirb:
require 'net/http'
rss = Net::HTTP.get(URI.parse('http://rss.wikio.fr/a_la_une.rss')) #some RSS feed with french accentuated characters
in MRI irb, you'll see accentuated characters like é, è, à...
in JRuby jirb, those are replaced by numbers.
also, adding
require 'jcode'
$KCODE = 'u'
doens't fix the issue. I should nontehless mention that using KCode in my Rails app makes Rails outputs properly accentuated caharcters as long as they are in the database or in the RHTML or Ruby code. But my Rss import fails because of that issue.
Any idea why net/http behaves differently? Any idea for a workarround?
Issue Links
| This issue relates to: | ||||
| JRUBY-828 | UTF-8 regular expressions aren't working |
|
|
|
| JRUBY-1008 | Rails pages that include \000 characters are including headers and chopping off the end of the page |
|
|
|
| This issue is related to: | ||||
| JRUBY-1007 | Not printing \XXX characters properly |
|
|
|
Woops, sorry,
to see the difference, the test should actually use KCode in both cases:
require 'jcode'
$KCODE = 'u'
require 'net/http'
rss = Net::HTTP.get(URI.parse('http://rss.wikio.fr/a_la_une.rss')) #some RSS feed with french accentuated characters
then acctentuated characters are OK in MRI, not in JRuby, sorry for the first test that wasn't correct.