# Problems with deprecations of islower, lowercase, isupper, uppercase

**URL:** https://discourse.julialang.org/t/problems-with-deprecations-of-islower-lowercase-isupper-uppercase/7797
**Category:** Internals & Design
**Created:** [December 15, 2017, 8:19pm UTC](https://discourse.julialang.org/t/problems-with-deprecations-of-islower-lowercase-isupper-uppercase/7797 "2017-12-15T20:19:32Z")
**Posts on this page:** 1
**Showing post:** 14

<div class="post-metadata">

### Author: ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)
#### Post date: [December 16, 2017, 9:00pm UTC](https://discourse.julialang.org/t/problems-with-deprecations-of-islower-lowercase-isupper-uppercase/7797/14 "2017-12-16T21:00:35Z")

</div>

Yes. For example, even ANSI Latin1 is not really fully compatible with Unicode when it comes to uppercase, even though the characters present in ANSI Latin1 are a pure subset of Unicode, because there are 2 characters whose uppercase versions are not present in Latin 1.

```julia

julia> uppercase("µ")[1]
ERROR: Base.uppercase has been moved to the standard library package Unicode.
Restart Julia and then run `using Unicode` to load it.
Stacktrace:
 [1] error(::Function, ::String, ::String, ::String, ::String, ::String, ::String) at ./error.jl:42
 [2] #uppercase#954(::NamedTuple{(),Tuple{}}, ::Function, ::String, ::Vararg{String,N} where N) at ./deprecated.jl:139
 [3] uppercase(::String, ::Vararg{String,N} where N) at ./deprecated.jl:139
 [4] top-level scope

```

^^^ That’s what I think should be changed, `uppercase` (and really all of the other functions moved to Unicode)  
existed in C for decades before Unicode came along.  
It just seems for fitting that Base should just have a generic fallback, that gives an error if the function has not been extended for a particular string type, and say that you need to do `using Unicode` to get those extensions for the Base `String` type.  
That will give a lot of flexibility for adding optimized versions as other string types are added in packages, such as for the ones in `LegacyStrings.jl`

```julia
julia> '\ub5'
'µ': Unicode U+00b5 (category Ll: Letter, lowercase)

julia> '\uff'
'ÿ': Unicode U+00ff (category Ll: Letter, lowercase)

julia> Base.Unicode.uppercase("ÿ")[1]
'Ÿ': Unicode U+0178 (category Lu: Letter, uppercase)

julia> Base.Unicode.uppercase("µ")[1]
'Μ': Unicode U+039c (category Lu: Letter, uppercase)

```

---

_[View the full topic](https://discourse.julialang.org/t/problems-with-deprecations-of-islower-lowercase-isupper-uppercase/7797)._
