-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
Milestone
Description
Not able to create a UTF-16LE encoded Regexp object. I tried the following in Jruby 1.7.19 in IRB:
abc8 = "abc"
abc8.encoding # <Encoding:UTF-8>
regex8 = Regexp.new(abc8) # succeeds
abc16 = "abc".encode("UTF-16LE")
abc16.encoding # <Encoding:UTF-16LE>
regex16 = Regexp.new(abc16)
# in MRI 1.9.3-p545 this succeeds
# in jruby 1.7.19: Encoding::CompatibilityError: incompatible character encodings: US-ASCII and UTF-16LE