Skip to content

Literal \あ results in invalid multibyte char error #1390

@BanzaiMan

Description

@BanzaiMan

As reported in https://twitter.com/y_shindoh/status/421425572284465152.

test.rb

puts '\\あ'
$ jruby -v --1.8 test.rb
jruby 1.7.9 (ruby-1.8.7p370) 2013-12-06 87b108a on Java HotSpot(TM) 64-Bit Server VM 1.7.0_45-b18 [darwin-x86_64]
\あ
$ jruby -v --1.9 -E UTF-8 test.rb
jruby 1.7.9 (1.9.3p392) 2013-12-06 87b108a on Java HotSpot(TM) 64-Bit Server VM 1.7.0_45-b18 [darwin-x86_64]
SyntaxError: test.rb:2: invalid multibyte char (US-ASCII)
$ jruby -v -E UTF-8 test.rb
jruby 1.7.10 (1.9.3p392) 2014-01-09 6e79f55 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_45-b18 [darwin-x86_64]
SyntaxError: test.rb:2: invalid multibyte char (US-ASCII)

It works on (near) master in the default 2.1.0 mode.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions