Error in string encoding conversion
-----------------------------------
Key: JRUBY-3324
URL: http://jira.codehaus.org/browse/JRUBY-3324
Project: JRuby
Issue Type: Bug
Components: Java Integration
Affects Versions: JRuby 1.1.7
Environment: trunk, windows vista, jdk 1.6.0_11
Reporter: Ricardo Trindade
I just noticed that the following doesn't work properly. Could it be that
there's an encoding conversion missing when calling to_s on a ruby object ?
def createFrame(component = nil, frame_title = "Teste")
frame = javax.swing.JFrame.new(frame_title)
frame.contentPane.setLayout(java.awt.BorderLayout.new)
frame.contentPane.add(component) unless component == nil
frame.setSize( 400,300 )
frame.show()
frame
end
class TestClass
def to_s
"çáÈão"
end
end
createFrame(javax.swing.JComboBox.new([TestClass.new, TestClass.new].to_java))
This was supposed to show the characters in to_s in a combo box, but
instead shows the wrong characters.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email