The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,835 other subscribers

Archive for the ‘Encoding’ Category

A while ago I encountered the GitHub unicorn page and saved it in a gist as it is a nice HTML example of embedding images

Posted by jpluimers on 2026/07/16

I hardly do web development, so every once in a while I encounter something that I forgot about.

In this case it was embedding images with base64 encoding in the HTML of a web page.

The GitHub unicorn page reminded me of that, so I saved it in a gist and a JSFiddle:

You can view the rendered HTML here:

Via: [Wayback/Archive] Jeroen Wiert Pluimers: “First time I got the GitHub unicorn.…” – Mastodon

Read the rest of this entry »

Posted in base64, CSS, Development, Encoding, HTML, Software Development, Web Development | Leave a Comment »

ASCII Table (Code page 437 – IBM PC) – hexadecimal/decimal – HardwareHacking/ascii.pdf at main · jillesdotcom/HardwareHacking · GitHub

Posted by jpluimers on 2026/07/15

One of the best ASCII tables I have ever come across: [Wayback/Archive] HardwareHacking/ascii.pdf at main · jillesdotcom/HardwareHacking · GitHub is a PDF extended ASCII Table (Code page 437IBM PC) – with hexadecimal/decimal markers.

Of course the PDF prints best, but the GitHub [Wayback/Archive] Render below is also quote useful:

Read the rest of this entry »

Posted in ASCII, Development, Encoding, Software Development | Leave a Comment »

Delphi/C# reencode textfiles: some links as I thought I published sources, but didn’t

Posted by jpluimers on 2026/06/30

A long time ago (likely around 2009) I remember writing some code to re-encode text files in both Delphi and C#.

Somehow I thought I had published both, but I could only find parts of the C# code back in .NET/C# – converting UTF8 to ASCII (yes, you can loose information with this) using System.Text.Encoding.

So here are some links just in case I ever want to reproduce it in Delphi too (and a reminder to always perform this using TStream derivatives, never use TStrings or derivatives like TStringList for this):

Read the rest of this entry »

Posted in .NET, Ansi, ASCII, C#, Delphi, Development, Encoding, Mojibake, Software Development, UCS-2, UTF-16, UTF-32, UTF-8, UTF16, UTF32, UTF8, Windows-1252 | Leave a Comment »

Henriëtte Klijnstra: banks use spaces as Mojibake replacements.

Posted by jpluimers on 2026/06/09

Henriëtte Klijnstra got a new bank card in the name of “HENRI TTE KLIJNSTRA”, a Mojibake so bad that [Wayback/Archive] ftfy – fix unicode that’s broken in various ways cannot fix it.

[Wayback/Archive] Henriëtte Klijnstra on Twitter: “Ik moet dit nog checken bij founder @JornReuvers, maar misschien is dit toch wel het topstuk tot nu toe in de geschiedenis van #givetremasachance Congrats voor @Openbank en @bancosantander voor dit kunststukje op m’n nieuwe pinpas”.

Read the rest of this entry »

Posted in Development, Encoding, ftfy, Mojibake, Software Development, Unicode | Leave a Comment »

Generating ASCII-tables with spanning cells: manual labour still needed

Posted by jpluimers on 2026/05/28

Every now and then, documentation in source code requires an ASCII table. Sometimes table cells are spanning multiple rows or/and column.

TL;DR: The tools I tried did not support that, so manual labour is still needed.

Read the rest of this entry »

Posted in ASCII, ASCII art / AsciiArt, Development, Documentation Development, Encoding, Excel, Fun, HTML, Office, Power User, Software Development, Web Development | Tagged: | Leave a Comment »

When you bump into Mojibake in your development, don’t use table-based solutions to solve it

Posted by jpluimers on 2026/05/14

A while ago I bumped into [Wayback/Archive] Unicode weirdness – VCL – Delphi-PRAXiS [en].

This sketched a mojibake problem where PDF to text converted files had odd looking character sequences.

The solution – replacing these sequences with more correctly looking text – worked at first, but then failed because the underlying source code got “corrected” from containing the Mojibake character sequences into the correct Unicode text.

A better solution is to figure out what series of encoding/decoding steps will give the correct text.

This is where – again – [Wayback/Archive] Home – ftfy: fixes text for you comes up: a still indispensable tool.

–jeroen

Posted in Delphi, Development, Encoding, Mojibake, PDF, Software Development | Leave a Comment »

MIME decoder for Windows – Super User

Posted by jpluimers on 2026/04/17

More than 10 years ago, I needed a MIME decode for Windows as I was developing some software which implemented S/MIME could sign automatically generated emails and verify incoming ones.

I wrote more about the latter part in Some notes on OpenSSL, S/MIME, email, various RFC standards and their relations.

Now finally the post about what I wanted to schedule for posting back then as well: my question looking for a [Wayback/Archive] MIME decoder for Windows – Super User:

Read the rest of this entry »

Posted in *nix, *nix-tools, base64, Development, Encoding, Linux, MIME, Power User, Software Development, Windows, WSL Windows Subsystem for Linux | Leave a Comment »

MacOS and Windows: sorting – Simple to enter Unicode character that would sort after Z in most cases? – Stack Overflow

Posted by jpluimers on 2026/03/10

TL;DR: There is no simple character that works on both MacOS and Windows.

[Wayback/Archive] sorting – Simple to enter Unicode character that would sort after Z in most cases? – Stack Overflow (thanks [Wayback/Archive] sorin and [Wayback/Archive] degenerate):

A

On Windows, none of these options work because they all sort before A.

A solution I ended up using is an Arabic character:

ٴ This folder comes after z in windows

Source

According to [Wayback/Archive] What Unicode character is this ?, the above mentioned character is U+0674 : ARABIC LETTER HIGH HAMZA.

Note that on Windows the ٴ character displays at the start of the filename, but on MacOS in Finder it ends up behind the extension (as Arabic script is right-to-left) and is very hard to remove. On the MacOS Terminal it ends up on the left and is easy to modify.

Read the rest of this entry »

Posted in Encoding, Power User, Unicode, Apple, Windows, Mac OS X / OS X / MacOS | Leave a Comment »

UTF-8, Explained Simply – YouTube

Posted by jpluimers on 2026/03/04

Cool interesting video: [Wayback/Archive] UTF-8, Explained Simply – YouTube

It covers both history from the late 1800s Baudot Code (also known as ITA1) via 1930s ITA2 and 1950’s EBCDIC / FIELDATA ages through 7-bit ASCII in the 1970s  and incompatible UCS-2 (now UTF-16) of the 1990s to the current day and age of UTF-8 (which actually started out on a placemat in 1992).

Though mentioning 8-bit encoding, it skips details of extended ASCII encodings like ISO/IEC 8859 and Windows-1252.

It goes to quite some length on decoding UTF-8 and showing how forgiving the UTF-8 standard is. Yes, it is a self-synchronising code thanks to the venerable Ken Thompson.

Definitely worth watching as it also covers the Zero-width joiner which is not just important for combining Emoji, as it is used by many people nowadays, but got in fact implemented to support various scripts like Arabic script or any Indic script.

Oh, the placemat story: Read the rest of this entry »

Posted in ASCII, Development, EBCDIC, Encoding, ISO-8859, Software Development, UCS-2, Unicode, UTF-16, UTF-8, Windows-1252 | Leave a Comment »

Decoding HTML encoded source to XML text

Posted by jpluimers on 2026/03/03

For Some links on getting the most recent defragmentation time of a Windows volume I needed to copy back and forth some XML code back and forth between my ARM MacBook Pro to a remote Windows machine accessing via the Microsoft Windows App (the app formerly known as Microsoft Remote Desktop for Mac).

The problem with that is the copying would lose line breaks, which for XML meaning is no problem, but for human understandability while editing the XML in the Event View query dialog was.

So I decided to go to the “Code” view in my Classic WordPress editor (did I ever tell you much I dislike – especially the accessibility of – the not so new but still haughty named Gutenberg editor?), copied the HTML encoded form and wanted to convert it to unencoded XML text.

Well, here I got to naming confusion land, on which I will talk further below, but first two of the potential solutions:

Read the rest of this entry »

Posted in Cyberchef, Development, Encoding, HTML, Mojibake, Software Development, URL Encoding, Web Development | Leave a Comment »