# Uppercase letter detection appears to be ignoring accented letters

**URL:** <https://meta.discourse.org/t/uppercase-letter-detection-appears-to-be-ignoring-accented-letters/26763>\
**Category:** Bug\
**Created:** [25 Marzo, 2015 11:35 UTC](https://meta.discourse.org/t/uppercase-letter-detection-appears-to-be-ignoring-accented-letters/26763 "2015-03-25T11:35:15Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [25 Marzo, 2015 22:59 UTC](https://meta.discourse.org/t/uppercase-letter-detection-appears-to-be-ignoring-accented-letters/26763/8 "2015-03-25T22:59:54Z")

</div>

You can actually do this in Ruby it just means you need to be a tad more fancy

> <https://stackoverflow.com/questions/8529595/how-can-i-check-a-word-is-already-all-uppercase/11415950#11415950>

```plaintext
utf_pattern = Regexp.new("\\p{Lower}".force_encoding("UTF-8"))

a = "Go234"
a.match(utf_pattern) # => #<MatchData "o">

b = "GO234"
b.match(utf_pattern) # => nil

b = "ÜÖ234"
b.match(utf_pattern) # => nil

b = "Über234"
b.match(utf_pattern) # => #<MatchData "b">

```

---

_[View the full topic](https://meta.discourse.org/t/uppercase-letter-detection-appears-to-be-ignoring-accented-letters/26763)._
