Project

General

Profile

Actions

Bug #20617

closed

/\pArabic/ character property doesn't match certain Arabic characters

Added by kytrinyx (Katrina Owen) 4 months ago. Updated 4 months ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-darwin21]
[ruby-core:118487]

Description

I am not sure this is a bug.

On some occasions I have Arabic text, but the Arabic character property rejects it as being Arabic.

Example:

str = "شغل مرحلة أولى ، جداً؟"
/^\p{Arabic}$/.match(str).inspect
# => nil

str.chars.reject {|char| /\p{Arabic}/.match(char)}.uniq
# arabic space, arabic comma, arabic question mark, and arabic fatahan

This isn't a problem, since I defined my own regex to include the missing characters, but wanted to raise it in case it is, in fact, a bug.

Actions

Also available in: Atom PDF

Like0
Like0Like0