# Lowercase and uppercase do not handle Mathematical Letters as expected

**URL:** https://discourse.julialang.org/t/lowercase-and-uppercase-do-not-handle-mathematical-letters-as-expected/110348
**Category:** General Usage
**Tags:** strings, unicode, char
**Created:** [February 17, 2024, 3:17pm UTC](https://discourse.julialang.org/t/lowercase-and-uppercase-do-not-handle-mathematical-letters-as-expected/110348 "2024-02-17T15:17:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![benjwweber](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benjwweber/32/206354_2.png) [@benjwweber](https://discourse.julialang.org/u/benjwweber)
#### Post date: [February 17, 2024, 3:17pm UTC](https://discourse.julialang.org/t/lowercase-and-uppercase-do-not-handle-mathematical-letters-as-expected/110348/1 "2024-02-17T15:17:05Z")

</div>

I have recently noticed that

```julia
lowercase('𝐴')
# '𝐴': Unicode U+1D434 (category Lu: Letter, uppercase)

```

and

```julia
uppercase('𝑎')
# '𝑎': Unicode U+1D44E (category Ll: Letter, lowercase)

```

do not behave as I would have expected, as 𝐴 and 𝑎 have the same(-ish) relation as A and a, one being the capital form, the other the small form.  
This seems to be the case for all Characters in the [Unicode Block “Mathematical Alphanumeric Symbols”](https://www.compart.com/en/unicode/block/U+1D400) that have both lower-case and upper-case (Small and Capital) forms, as well as some Characters where the corresponding lower-case or upper-case form is in the [Unicode block “Letterlike Symbols”](https://www.compart.com/en/unicode/block/U+2100) (for example ‘ℛ’ and ‘𝓇’. )  
Is this behaviour intended?

---

<div class="post-metadata">

### Author: ![mnemnion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mnemnion/32/206596_2.png) [@mnemnion](https://discourse.julialang.org/u/mnemnion)
#### Post date: [February 17, 2024, 5:07pm UTC](https://discourse.julialang.org/t/lowercase-and-uppercase-do-not-handle-mathematical-letters-as-expected/110348/2 "2024-02-17T17:07:26Z")

</div>

> [@benjwweber](#):
>
> `𝐴`

Yes, this is intentional. The name of that character in Unicode is MATHEMATICAL ITALIC CAPITAL A, and if you search the [Case Folding Dataset](https://www.unicode.org/Public/UNIDATA/CaseFolding.txt), you will see that it isn’t included.

To guess at the reasoning, a mathematical variable `𝐴` and a variable `𝑎` always refer to different things, so transforming the former into the latter would be undesirable.

---

<div class="post-metadata">

### Author: ![benjwweber](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benjwweber/32/206354_2.png) [@benjwweber](https://discourse.julialang.org/u/benjwweber)
#### Post date: [February 17, 2024, 6:38pm UTC](https://discourse.julialang.org/t/lowercase-and-uppercase-do-not-handle-mathematical-letters-as-expected/110348/3 "2024-02-17T18:38:14Z")

</div>

Thanks for the reply! Reasoning from the perspective of `𝐴` and `𝑎` as mathematical variables makes a lot of sense.
