JRuby

Ruby 1.9 mode should guess system encoding if not specified

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.3.1
  • Fix Version/s: JRuby 1.6RC2
  • Component/s: HelpWanted, Ruby 1.9.2
  • Labels:
    None
  • Number of attachments :
    0

Description

Ruby 1.9 mode must guess the default system encoding (Encoding related). This may be a fairly easy one...perhaps we can just use whatever Java reports as the default encoding?

Activity

Hide
Thomas E Enebo added a comment -

Not making 1.4. HelpWanted

Show
Thomas E Enebo added a comment - Not making 1.4. HelpWanted
Hide
Yoko Harada added a comment -

To get default encoding in Java,

String encoding = Charset.defaultCharset().name();

works.
Do you want this sort of easy answer?
For what kind of Ruby 1.9 encoding, will you use Java's default encoding?

Show
Yoko Harada added a comment - To get default encoding in Java,
String encoding = Charset.defaultCharset().name();
works. Do you want this sort of easy answer? For what kind of Ruby 1.9 encoding, will you use Java's default encoding?
Hide
Thomas E Enebo added a comment -

I fixed this in e275d67. It will use whatever Java thinks is the charset and fallback to ascii-8bit if nothing specified by Java (which I believe is impossible, but not totally sure).

Show
Thomas E Enebo added a comment - I fixed this in e275d67. It will use whatever Java thinks is the charset and fallback to ascii-8bit if nothing specified by Java (which I believe is impossible, but not totally sure).

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: