RubyString.newUnicodeString in 1.9 mode produces ASCII-8BIT
-----------------------------------------------------------
Key: JRUBY-5646
URL: http://jira.codehaus.org/browse/JRUBY-5646
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.6
Environment: Linux arya 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1
14:40:58 UTC 2011 i686 GNU/Linux
jruby 1.6.0.RC3 (ruby 1.8.7 patchlevel 330) (2011-03-11 3d4d1d4) (Java
HotSpot(TM) Client VM 1.6.0_24) [linux-i386-java]
(git HEAD)
Reporter: kristian meier
Assignee: Thomas E Enebo
in a spec from DataObjects (DO from datamapper) I see following error with
jruby from the HEAD in 1.9 mode:
Encoding::CompatibilityError: incompatible character encodings: UTF-8 and
ASCII-8BIT
the later encoding comes from a string which gets initiated by
{noformat}
RubyString.newUnicodeString(runtime, str);
{noformat}
the fix for DO was/is to use
{noformat}
RubyString.newString(runtime, new ByteList(RubyEncoding.encodeUTF8(str),
false), Encoding.load("UTF8"));
{noformat}
which works. IMO this indicates some "wrong defaults".
dito I see with jruby-complete-1.6.0.jar (1.9 mode)
--
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