Details

    • Type: Test Test
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: JRuby 1.6.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Activity

      Hide
      Diego Plentz added a comment -

      Charles/Thomas,

      I isolated the tests more and I think it's easier to find out the problems. Now we're down to 2 problems:

      • OkJson.engine should generate the same char codepoint in both implementations(actually it generates \u00C3\u00A1 for JRuby and \xC3\xA1 for MRI)
      • Yajl::Encoder should encode the YAML in both implementations, even with special chars (actually it only works in MRI)

      The updated code is here: https://github.com/plentz/jruby_report

      Show
      Diego Plentz added a comment - Charles/Thomas, I isolated the tests more and I think it's easier to find out the problems. Now we're down to 2 problems: OkJson.engine should generate the same char codepoint in both implementations(actually it generates \u00C3\u00A1 for JRuby and \xC3\xA1 for MRI) Yajl::Encoder should encode the YAML in both implementations, even with special chars (actually it only works in MRI) The updated code is here: https://github.com/plentz/jruby_report
      Hide
      Thomas E Enebo added a comment -

      Started examining this for a quick fix. When I explicitly use json/pure in money rspecs all the encoding issues go away. json-java fails and I suspect the native extension might need some additional love for string creation in 1.9 mode. Currently, it seems to make all strings it creates as ASCII-8BIT when the source string starts as UTF-8.

      This particular issue should probably be replaced by multiple individual issues (I suspect for each native extension), but I will leave it open until I get some traction on json-java.

      Show
      Thomas E Enebo added a comment - Started examining this for a quick fix. When I explicitly use json/pure in money rspecs all the encoding issues go away. json-java fails and I suspect the native extension might need some additional love for string creation in 1.9 mode. Currently, it seems to make all strings it creates as ASCII-8BIT when the source string starts as UTF-8. This particular issue should probably be replaced by multiple individual issues (I suspect for each native extension), but I will leave it open until I get some traction on json-java.
      Hide
      Thomas E Enebo added a comment -

      As I mentioned in last comment json_pure works right now. json-java will be fixed once this is merged:

      https://github.com/flori/json/pull/119

      For the ambitious OkJson you should be able to examine my commit and figure out what needs to change in this gem.

      Diego, can you update your example to use json-java (you will need to build it yourself [jrake jruby_gem]) and make sure this gem is at least functioning as you expect?

      Show
      Thomas E Enebo added a comment - As I mentioned in last comment json_pure works right now. json-java will be fixed once this is merged: https://github.com/flori/json/pull/119 For the ambitious OkJson you should be able to examine my commit and figure out what needs to change in this gem. Diego, can you update your example to use json-java (you will need to build it yourself [jrake jruby_gem] ) and make sure this gem is at least functioning as you expect?
      Hide
      Diego Plentz added a comment -

      Thomas,

      Thanks for that fix in the flori/json lib. I think that everything is fine now. OkJson also has been updated and I'm just waiting for a reply here https://github.com/brianmario/yajl-ruby/issues/97, but either way, looks like that none of the problems(https://github.com/intridea/multi_json/issues/25) are with Jruby itself, so I think its better to close this issue and open another if a new problem appears. Thanks!

      Show
      Diego Plentz added a comment - Thomas, Thanks for that fix in the flori/json lib. I think that everything is fine now. OkJson also has been updated and I'm just waiting for a reply here https://github.com/brianmario/yajl-ruby/issues/97 , but either way, looks like that none of the problems( https://github.com/intridea/multi_json/issues/25 ) are with Jruby itself, so I think its better to close this issue and open another if a new problem appears. Thanks!
      Hide
      Diego Plentz added a comment -

      Turns out that all the problems where in the related gems.

      Show
      Diego Plentz added a comment - Turns out that all the problems where in the related gems.

        People

        • Assignee:
          Thomas E Enebo
          Reporter:
          Diego Plentz
        • Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: