---
title: "Discussion on \"Why Uppercasing a String Can Change Its Length\" | Hashnode"
description: "Discussion on \"Why Uppercasing a String Can Change Its Length\". Converting strings to uppercase can change their length. Learn why characters like the German ß expand to SS and how this Unicode behavior breaks assumptions."
url: "https://hashnode.com/posts/why-uppercasing-a-string-can-change-its-length/6aef68b97c81683612b4e3ca"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why Uppercasing a String Can Change Its Length](https://doogal.dev/why-uppercasing-a-string-can-change-its-length?utm_source=hashnode&utm_medium=feed)

Converting strings to uppercase can change their length. Learn why characters like the German ß expand to SS and how this Unicode behavior breaks assumptions.

Nov 7 · 4 min read · doogal.dev  
Read the article

-   [#programming](https://hashnode.com/tag/programming)
-   [#softwareengineering](https://hashnode.com/tag/softwareengineering)
-   [#unicode](https://hashnode.com/tag/unicode)
-   [#computerscience](https://hashnode.com/tag/computerscience)

## Written by

[Doogal Simpson](https://hashnode.com/@doogal)

@doogal

  
[View profile](https://hashnode.com/@doogal)

"hey doogal, what is .... ?"

## Responses 1

Markdown supported · ⌘↵ to post

[SMTasker](https://hashnode.com/@smtasker)

[Nov 10](https://hashnode.com/posts/why-uppercasing-a-string-can-change-its-length/6aef68b97c81683612b4e3ca/comment/6af37b63056876d44c48f341)

Alongside expansion, I'd test collisions in the transformed key: Python turns both 'straße' and 'strasse' into 'STRASSE'. Checking the final length helps with your VARCHAR example, but it won't catch two different accepted inputs mapping to the same stored identifier. If casing is used for keys, make the uniqueness policy apply to that final representation too.
