FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Your String is Not What You Think It Is
NewsSystems

Your String is Not What You Think It Is

via Dev.toNaz Quadri3h ago

Your String is Not What You Think It Is A Tour Through the Encoding Wars, and Why len("café") Returns 4 Reading time: ~13 minutes You called len("café") and Python told you 4. You passed that string to a function that encoded it to bytes. The bytes were 5 long. You stared at the screen for longer than you'd admit. Then you got a bug report from a user in Brazil whose name broke your database. Your colleague on a Windows machine opened the CSV you exported and saw é where there should have been é . You fixed it by guessing — add .encode('utf-8') here, .decode('utf-8') there — and it stopped crashing. But if someone asked you why , the honest answer is probably: "Something about encodings." Let's fix that gap. In Pressing a Key , I traced a keypress from the keyboard matrix to your shell's stdin. The scan code 0x04 became the letter a somewhere in the stack. But what is the letter a ? It turns out the answer is deeper than you'd expect. The Core Confusion Here's the thing that trips eve

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles

Axios Gets 100 Million Downloads a Week. Today, Two Came With a Trojan.
News

Axios Gets 100 Million Downloads a Week. Today, Two Came With a Trojan.

Medium Programming • 3h ago

Robotaxi companies refuse to say how often their AVs need remote help
News

Robotaxi companies refuse to say how often their AVs need remote help

TechCrunch • 3h ago

I Set the Thread Pool to 8 and Brought Down Black Friday
News

I Set the Thread Pool to 8 and Brought Down Black Friday

Medium Programming • 3h ago

News

How I Built Simple Automation Systems That Save Time (And Why Businesses Need Them)

Medium Programming • 4h ago

News

wastrelly wabbits

Lobsters • 4h ago

Discover More Articles