About:

Author of 'Giovanni Dicanio's Blog'—a programming-focused site described as 'Giovanni Dicanio's Programming Corner on the Internet.'

Website:

Subscribe to RSS:
The blog post discusses the evolution of string character types in Windows C/C++ programming, tracing the transition from char to TCHAR to wchar_t and back to char. It highlights the historical context of these changes, particular...
The blog post debunks the myth that UTF-8 can be seamlessly used as a drop-in replacement for ASCII in C++ code. It explains that while UTF-8 is a popular encoding, using it in functions designed for ASCII can lead to subtle bugs,...
The blog post discusses the common mistakes in converting Unicode strings to lower and upper cases in C++. It criticizes the prevalent char-by-char conversion methods using std::tolower and std::toupper, highlighting their inadequ...
The blog post discusses how to find the next Unicode code point in text encoded with UTF-8 and UTF-16, comparing the simplicity of both encodings. It explains that UTF-16 uses 16-bit code units and is generally simpler in implemen...
The blog post discusses Linus Torvalds' criticism of a RISC-V Linux kernel contribution, labeling it as 'garbage code.' It focuses on the helper function make_u32_from_two_u16() and contrasts it with Linus's proposed explicit code...
The blog post discusses the best practices for passing C++ STL string objects, specifically std::wstring and std::wstring_view, to Win32 API functions. It emphasizes the importance of using const references to avoid expensive copi...
The blog post discusses the process of converting C++ strings between Unicode UTF-16 and UTF-8 using Windows APIs, specifically focusing on the WideCharToMultiByte function. It explains the importance of UTF-16 as the native encod...
The blog post discusses how to bridge managed C# code with native C++ code using P/Invoke. It explains the process of creating a custom structure in C# that corresponds to a C++ structure and how to use DllImport to call a C-inter...
The blog post explains how to manually edit the tasks.json file in Visual Studio Code to set the C++ language standard version for compilation, specifically detailing the addition of the '/std:c++20' option for the MSVC compiler. ...
The blog post discusses the challenges of passing C++ std::string_view or std::wstring_view to C-interface APIs, such as Win32, which expect null-terminated strings. It highlights the potential bugs that can arise due to the lack ...
The blog post explains how to wrap the Windows API function FormatMessage in C++ to retrieve descriptive error messages corresponding to Windows system error codes. It details the use of the FormatMessageW function, including the ...
The blog post discusses the challenges faced when selecting the C++20 language standard in Visual Studio Code (VS Code) for C++ development. The author, an experienced user of Visual Studio, highlights the confusion caused by the ...
The blog post addresses a common issue encountered when building mixed C++/C# projects in Visual Studio, specifically a System.DllNotFoundException that occurs when a C# application fails to locate a native C++ DLL. The author des...
The article expresses frustration with the article suggestion process on IsoCpp.org, highlighting inconsistencies in acceptance timing and a lack of communication. The author notes that while suggesting articles requires effort, t...