To remove all whitespace characters, including non-ASCII ones (e.g., non-breaking space), in a string you could try using `gsub` with `:space` as the matcher and `""` (empty string) as the replacement:
```ruby
string = " Some Special Text Values ".gsub(/[[:space:]]+/, "")
puts '[' + string + ']' # "[SomeSpecialTextValues]
string = " em spaces ".gsub(/[[:space:]]+/, "")
puts '[' + string.strip + ']' # [emspaces]
```
To remove leading and trailing whitespace characters, you can try:
```ruby
string = " em spaces "
.gsub(/^[[:space:]]+/, "")
.gsub(/[[:space:]]+$/, "")
puts '[' + string.strip + ']' # [em spaces]
string = " em spaces ".strip
puts '[' + string.strip + ']' # [ em spaces]
```
Note how `strip` only removes the trailing whitespaces (i.e., `SPACE U+0020`) while leaving the leading whitespaces (i.e., `EM SPACE U+2003`) as-is. That's because `strip` only removes ASCII whitespace characters.