Finding the Next Code Point in Unicode Strings -- Giovanni Dicanio

With ASCII, it's very simple to find the next character in a string: you can just increment an index (i++) or char pointer (pch++). But what happens when you have Unicode strings to process?

Finding the Next Unicode Code Point in Strings: UTF-8 vs. UTF-16

by Giovanni Dicanio

From the article:

Both UTF-16 and UTF-8 are variable-length encodings. In particular, UTF-8 encodes each valid Unicode code point using one to four 8-bit byte units. On the other hand, UTF-16 is somewhat simpler: In fact, Unicode code points are encoded in UTF-16 using just one or two 16-bit code units.

(...) The functions have the following prototypes:

// Returns the next Unicode code point and number of bytes consumed.
// Throws std::out_of_range if index is out of bounds or string ends prematurely.
// Throws std::invalid_argument on invalid UTF-8 sequence.
[[nodiscard]] std::pair<char32_t, size_t> NextCodePointUtf8(
    const std::string& str,
    size_t index
);

// Returns the next Unicode code point and the number of UTF-16 code units consumed.
// Throws std::out_of_range if index is out of bounds or string ends prematurely.
// Throws std::invalid_argument on invalid UTF-16 sequence.
[[nodiscard]] std::pair<char32_t, size_t> NextCodePointUtf16(
    const std::wstring& input,
    size_t index
);

 

Hardening the C++ Standard Library at massive scale -- Dionne, Rebert, Shavrick, and Varlamov

acmqueue_logo.gifMemory-safety vulnerabilities remain one of the most persistent and costly risks in large-scale C++ systems, even in well-tested production code. This article explores how hardening the C++ Standard Library—specifically LLVM’s libc++—can deliver meaningful security and reliability gains at massive scale with minimal performance overhead.

Practical Security in Production: Hardening the C++ Standard Library at massive scale

by Louis Dionne, Alex Rebert, Max Shavrick, and Konstantin Varlamov

From the article:

Over the past few years there has been a lot of talk about memory-safety vulnerabilities, and rightly so—attackers continue to take advantage of them to achieve their objectives. Aside from security, memory unsafety can be the cause of reliability issues and is notoriously expensive to debug. Considering the billions of lines of C++ code in production today, we need to do what we can to make C++ measurably safer over the next few years with as low of an adoption barrier as possible.

In 2019, Alex Gaynor, a security expert and one of the leading voices in memory safety, wrote a piece titled "Modern C++ Won't Save Us," where he gave examples of foundational types such as std::optional that were unsafe in the idiomatic use cases. What happens when these unsafe types are used beyond their contract? Well, you guessed it: undefined behavior. The std::optional type isn't the only one to behave like this. If you look at how this compares with modern languages, you can see that C++ is the outlier.

So, what's to be done? Possibly one of the best places to start today is by improving our standard libraries. They provide the baseline "vocabulary types" for developers—and if they're not safe, it will be tough to build safety around them. The std::optional type is only one of many vocabulary types in the C++ Standard Library that aren't safe by default today. Given the current state, it seems mostly clear that the first step should be hardening our standard library, and in our case, this was LLVM's libc++.

Qt acquires I.A.R.

Qt completes the recommended public cash offer to the shareholders of I.A.R. Systems Group

From the article:

On 4 July 2025, Qt Group Plc's ("Qt Group") wholly owned subsidiary The Qt Company Ltd ("The Qt Company" and together with Qt Group, "Qt"), announced a recommended public cash offer to the shareholders of class B shares (the "Shares" or, individually, a "Share") in I.A.R. Systems Group AB (publ) ("IAR"), to tender all their Shares at a price of SEK 180 in cash per Share (the "Offer"). The Shares in IAR are traded on Nasdaq Stockholm, Mid Cap. An offer document relating to the Offer was published on 15 August 2025.

At the end of the acceptance period on 10 October 2025, the Offer had been accepted by shareholders with a total of 12,037,848 Shares in IAR, corresponding to 94.49 per cent of the outstanding shares and votes in IAR.[1] As a result, The Qt Company controls in total 12,037,848 Shares in IAR, corresponding to 94.49 per cent of the outstanding shares and votes in IAR.[2]

The Qt Company has decided to complete the Offer. All conditions are satisfied or have been waived. Settlement for Shares tendered in the Offer during the initial acceptance period will be initiated on or around 17 October 2025.

 

Event-driven flows -- Andrzej KrzemieĊ„ski

2025-12-19_10-06-35.pngThis post is in response to two claims about coroutines: 1) Their reference function parameters may become dangling too easily, and 2) They are indistinguishable from regular functions from the declaration alone.

Event-driven flows

by Andrzej Krzemieński

From the article:

A canonical example of an event-driven flow is the handling of signals in C. Signals will be risen at unpredictable points in time, so rather than actively checking for them, we define a callback and associate it with the indicated signal:

signal(SIGINT, on_interrupt);

 

After having performed this association, we move on to doing other things. It is the implementation (system, or parts of the program we do not write) that will make sure to invoke the callback when the signal is risen (if at all). We can illustrate it with a diagram:

 

Qt Jenny 1.0 Released -- Rami Potinkara

Qt Jenny is a Java/Android JNI glue/proxy Qt code generator. You can find and get it from Maven Central. Qt Jenny is a fork of Jenny from LanderlYoung. The fork differs from the original one by supporting JNI call gluing with QJni - classes such as QJniObject. That brings the powers of Qt for Android and the magic of Android Java native APIs to Qt!

Qt Jenny 1.0 Released

by Rami Potinkara

From the article:

Have you heard about Jenny? No, I do not mean, the girl next door, nor the Spinning Jenny that started the industrial revolution in England in the 17th century. This one is a modern information age revolution, a code generator, a cuter Jenny. Got your eyebrows raised? Are you a Qt developer? Perhaps you are mastering cross-platform development with Qt and deploying apps to Google Play? Read more below!

Converting Between Unicode UTF-16 and UTF-8 in Windows C++ Code -- Giovanni Dicanio

Very often the need arises in Windows C++ programming to convert text between Unicode UTF-16 (which historically has been the native Unicode encoding used by Windows APIs) and UTF-8 (which is the de facto standard for sending text across the Internet and exchanging text between different platforms).

Converting Between Unicode UTF-16 and UTF-8 in Windows C++ Code

by Giovanni Dicanio

From the article:

A detailed discussion on how to convert C++ strings between Unicode UTF-16 and UTF-8 in C++ code using Windows APIs like WideCharToMultiByte, and STL strings and string views.

 

C++ Standard Evolution Viewer -- Jason Turner

EDepositphotos_193487310_L.jpgxplore how the C++ standard evolved across versions with interactive side-by-side diffs

C++ Standard Evolution Viewer

by Jason Turner

From the article:

This site provides an interactive way to explore changes in the C++ standard by viewing side-by-side diffs of individual sections (identified by stable names like [array][class.copy][ranges.adaptors]).

Each version transition below focuses on Tier 1 sections (major library components and language features) to provide the most educational value.

PVS-Studio 7.40: support for Visual Studio 2026, Qt Creator 18, UE5 Horde

PVS-Studio 7.40 has been released. The new version brings support for Visual Studio 2026 and Qt Creator 18, adds analysis of .NET 10 projects, enhances C# diagnostic rules, and includes other new features.

PVS-Studio 7.40: support for Visual Studio 2026, Qt Creator 18, .NET 10, and more

by Gleb Aslamov

From the article:

The new release introduces support for the fresh Visual Studio 2026. We're glad to present PVS-Studio plugin for Qt Creator 18.x. The plugin lets you run static analysis, view warnings, and handle your code directly within your IDE. Unreal Engine 5.5 brings a new tool called Horde, a platform that enables users to leverage CPU cycles on other machines to accelerate workloads. We've updated the documentation section on working with Unreal Engine projects and included instructions for using the analyzer in the Unreal Build Accelerator distributed build system.