Logo
First tweet ever: 'just setting up my twttr'
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • Csharp Csharp
  • All Categories
As an Amazon Associate ProgrammerHumor.io earns from qualifying purchases.

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

Locale Memes

Posts tagged with Locale

To Lower And To Upper Aren't As Innocent As They Seem Just Saying

Programming Javascript Debugging Backend
4 months ago 312.3K views 0 shares
To Lower And To Upper Aren't As Innocent As They Seem Just Saying
Using toLowerCase() or toUpperCase() in your conditional logic? That's some big brain energy right there. Most devs just slap these methods on strings for case-insensitive comparisons without a second thought, but the real ones know this is a minefield of locale-specific chaos waiting to explode. The Turkish İ problem is legendary: in Turkish locale, the uppercase of 'i' is 'İ' (with a dot), not 'I', and lowercase 'I' becomes 'ı' (without a dot). So your innocent if (userInput.toLowerCase() === "admin") suddenly breaks when deployed in Turkey. There's also the German ß that uppercases to "SS", and Greek sigma has different lowercase forms depending on position. Unicode is wild, and these methods respect locale by default in some languages. Pro tip: use toLocaleUpperCase() or toLocaleLowerCase() when you actually care about proper linguistic handling, or better yet, use case-insensitive comparison methods that don't mutate strings. The lion knows what's up.

Today's picks

SteelSeries Apex Pro Mini Gen 3 OmniPoint 3.0 HyperMagnetic Switches — Adjustable Actuation — Rapid Trigger — Game-Ready Presets — Protection Mode — Rapid Tap/SOCD — RGB — PBT Keycaps — USB-C

SteelSeries Apex Pro Mini Gen 3 OmniPoint 3.0 HyperMagnetic Switches — Adjustable Actuation — Rapid Trigger — Game-Ready Presets — Protection Mode — Rapid Tap/SOCD — RGB — PBT Keycaps — USB-C

Affiliate
$164.99
Programmers in these days

Programmers in these days

Programming
65.0K views 4 years ago
Your Code's Emotional Support Animal

Your Code's Emotional Support Animal

Programming
232.8K views 1 year ago