Urgent.News

What's breaking now, across thousands of outlets.

Science

Python 3.15 goes global with UTF-8 support

Decades of cross-platform character corruption finally comes to an end for Windows coders

Python 3.15 goes global with UTF-8 support

Python 3.15, the latest version of the popular programming language, has recently been released, bringing a range of new features and improvements to the Python community. Among these updates, one that may particularly interest data analysts and developers working on Windows systems is the default UTF-8 support across all platforms.

Previously, Python defaulted to the host system's locale encoding, which caused issues for Windows users when opening UTF-8-encoded data sets. These data sets often contained non-ASCII characters, such as smart quotes or fancy apostrophes, that would either corrupt or crash the program. This inconvenience led to the proposal of Python Enhancement Proposal 681 in 2022, which aimed to make UTF-8 the preferred encoding for Python.

Although Python had already been accommodating UTF-8 to some extent, programmers were required to include a specific flag in their code to enable it. This often led to confusion and frustration, as many developers were unaware of the need to make this adjustment. With the release of Python 3.15, UTF-8 support has now become the default across all platforms, including Windows.

This change is significant, as it aligns Python with other popular languages and runtimes, such as Java, Ruby, Rust, Go, and Node.js, all of which have adopted UTF-8 as their default encoding scheme. UTF-8 offers a range of benefits, including efficiency and inclusiveness, covering over 1.1 million symbols from the Unicode catalog. This includes support for smart quotes, emojis, musical and mathematical notations, and various Chinese dialects, as well as some extinct languages for research purposes.

To help developers familiarize themselves with Python 3.15's new features, including the default UTF-8 support, longtime Python programmer Barry Warsaw (known as "Uncle Barry") has created an adventure game called "whatsnewt." The game contains 18 puzzles, each focusing on a new feature introduced in Python 3.15, including a puzzle dedicated to UTF-8 support. The game can be downloaded and installed with "pip install whatsnewt" and run on the Python command line, including on Windows systems.

Written by urgent.news from The Register Science's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Also reported by 1 other outlet

Read the original at theregister.com →

More in Science

More from Wednesday 14 October →