Project

General

Profile

Feature #10152

String#strip doesn't remove non-breaking space

Added by nvll (Adrian Mazur) over 3 years ago. Updated over 2 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:64462]

Description

String#strip doesn't remove non-breaking space.

2.1.2 :001 > "\u00A0".strip
 => " " 

Related issues

Related to CommonRuby - Feature #10085: Add non-ASCII case conversion to String#upcase/downcase/swapcase/capitalizeClosed

History

#1 [ruby-core:64465] Updated by nobu (Nobuyoshi Nakada) over 3 years ago

  • Tracker changed from Bug to Feature
  • Description updated (diff)

#2 [ruby-core:64466] Updated by matz (Yukihiro Matsumoto) over 3 years ago

  • Related to Feature #10085: Add non-ASCII case conversion to String#upcase/downcase/swapcase/capitalize added

#3 [ruby-core:64469] Updated by matz (Yukihiro Matsumoto) over 3 years ago

Current Ruby does not support non ASCII spaces. Maybe 2.2+ would.

Matz.

#4 Updated by ojab (ojab ojab) over 2 years ago

There is an issue not only for non-breaking space, but also for other unicode spaces, see #7845. For example (excerpt from rails String#squish testcase) %{\u205f\u3000 A string surrounded by various unicode spaces, with tabs(\t\t), newlines(\n\n), unicode nextlines(\u0085\u0085) and many spaces( ). \u00a0\u2007}.
So I think that this ticket should be closed in favour of #7845.

Also available in: Atom PDF