Issue Type: Bug Bug
Affects Versions: JRuby 1.7.1, JRuby 1.7.0, JRuby 1.6.8
Assignee: Unassigned
Components: Encoding
Created: 21/Dec/12 3:56 AM
Description:

Originally reported here:
https://github.com/jnicklas/capybara/issues/900

The following regexp fails with "SyntaxError: (RegexpError) incompatible character encoding":

/[\s\u0085\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]+/

(Full source code: https://github.com/jnicklas/capybara/blob/master/lib/capybara/helpers.rb)

Adding "# encoding: UTF-8" at the top of the file solves the problem, but I don't understand why it's needed - there are no actual unicode characters in the file, only those /u codes.

Tested with JRuby 1.6.8, 1.7.0 and 1.7.1.

The problem doesn't exist in MRI Ruby 1.9.3-p327 (i.e. no encoding header is needed for the regexp to work).

Project: JRuby
Priority: Minor Minor
Reporter: Piotr Krawiec
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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

Reply via email to