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 2,433 other followers

Archive for the ‘ISO-8859’ Category

Long read about Unicode: You, Me And The Emoji: Character Sets, Encoding And Emoji – Smashing Magazine

Posted by jpluimers on 2017/11/07

A well worth long rad:

We all recognize emoji. They’ve become the global pop stars of digital communication. But what are they, technically speaking? And what might we learn by taking a closer look at these images, characters, pictographs… whatever they are 🤔 (Thinking Face). We will dig deep to learn about how these thingamajigs work. Please note: Depending on your browser, you may not be able to see all emoji featured in this article (especially the Tifinagh characters). Also, different platforms vary in how they display emoji as well. That’s why the article always provides textual alternatives. Don’t let it discourage you from reading though! Now, let’s start with a seemingly simple question. What are emoji?

[WayBackYou, Me And The Emoji: Character Sets, Encoding And Emoji – Smashing Magazine

Via: [WayBack] Everything you ever wanted to know about characters, encodings, glyphs… and, oh yeah, emoji: bit.ly/2fNKeW3Long, rewarding read. – Ilya Grigorik – Google+

Here is just the ToC:

TABLE OF CONTENTS LINK

  1. Character Sets And Document Encoding: An Overview
    1. Characters
    2. Character Sets
    3. Coded Character Sets
    4. Encoding
  2. Declaring Character Sets And Document Encoding On The Web
    1. content-type HTTP Header Declaration
    2. Checking HTTP Headers Using A Browser’s Developer Tools
    3. Checking HTTP Headers Using Web-based Tools
    4. Using A Meta Element With charset Attribute
    5. An Encoding By Any Other Name
  3. What Were We Talking About Again? Oh Yeah, Emoji!
    1. So What Are Emoji?
    2. How Do We Use Emoji?
    3. Character References
    4. Glyphs
    5. How Do We Know If We Have These Symbols?
    6. The Great Emoji Proliferation Of 2016
  4. Emoji OS Support
    1. Emoji Support: Apple Platforms (macOS and iOS)
    2. Emoji Support: Windows
    3. Emoji Support: Linux
    4. Emoji Support: Android
  5. Emoji On The Web
    1. Emoji One
    2. Twemoji
  6. Conclusion

–jeroen

Posted in ASCII, Development, Encoding, ISO-8859, ISO8859, Shift JIS, Unicode, UTF-16, UTF-8, UTF16, UTF8, Windows-1252 | Leave a Comment »

Looking for more examples of Unicode/Ansi oddities in Delphi 2009+

Posted by jpluimers on 2017/09/25

At the end of April 2014, Roman Yankovsky started a nice [Wayback] discussion on Google+ trying to get upvotes for [Wayback] QualityCentral Report #:  124402: Compiler bug when comparing chars.

His report basically comes down to that when using Ansi character literals like #255, the compiler treats them as single-byte encoded characters in the current code page of your Windows context, translates them to Unicode, then processes them.

The QC report has been dismissed as “Test Case Error” (within 15 minutes of stating “need more info”) by one of the compiler engineers, directing to the [Wayback] UsingCharacterLiterals section of Delphi in a Unicode World Part III: Unicodifying Your Code where – heaven forbid – they suggest to replace #128 with the Euro-Sign literal.

I disagree, as the issue happens without any hint or warning whatsoever, and causes code that compiles fine in Delphi <= 2007 to fail in subtle ways on Delphi >= 2009.

The compiler should issue a hint or warning when you potentially can screw up. It doesn’t. Not here.

Quite a few knowledgeable Delphi people got involved in the discussion:

Read the rest of this entry »

Posted in Ansi, ASCII, Conference Topics, Conferences, CP437/OEM 437/PC-8, Delphi, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, Encoding, Event, ISO-8859, Missed Schedule, QC, SocialMedia, Software Development, Unicode, UTF-8, Windows-1252, WordPress | Leave a Comment »

git encoding trouble: recursively removing a directory where git prints out a different name than it accepts

Posted by jpluimers on 2017/05/11

The story so far:

A few years back I put all my conferences material in a GitHub repository https://github.com/jpluimers/Conferences/. There were a lot directories and files so I didn’t pay much attention to the initial check-in list. The files had been part of copy.com syncing between Windows and Mac machines.

Often git on a Mac is a bit easier than on Windows (on a Mac you can install them with the xcode-select --install trick which installs only the Command Line Tools without having to install the full Xcode [WayBack]).

I choose a Mac because it is closer to a Linux machine than Widows so I expected no encoding trouble (as git has a Linux origin: it “was created by Linus Torvalds in 2005 for development of the Linux kernel“).

Boy I was wrong:

Recently I cloned the repository in a different place and found out a few strange things:

  1. Directories with accented characters had been duplicated, for instance in https://github.com/jpluimers/Conferences/tree/master/2011
    1. …/EKON15-Renaissance-Hotel-D%FCsseldorf
    2. …/EKON15-Renaissance-Hotel-Düsseldorf
  2. Beyond Compare would show the same content
  3. After a check-out git would not understand the %FC encoded directory name (%FC is IEC_8859-1 encoding for ü and \374 is the octal representation of 0xFC [WayBack]) and a git status would show stuff like this:
    • Untracked files:
        (use "git add ..." to include in what will be committed)
      
          EKON15-Renaissance-Hotel-D%FCsseldorf/

      or

      deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Debugging/BO-EKON15-Delphi-XE2-Debugging.pdf"
  4. A git rm -r --cached call [WayBack] would not work, as both these would fail:
    • $ git rm -r --cached EKON15-Renaissance-Hotel-D%FCsseldorf
      fatal: pathspec 'EKON15-Renaissance-Hotel-D%FCsseldorf' did not match any files
      

      and

      $ git rm -r --cached "EKON15-Renaissance-Hotel-D\374sseldorf"
      fatal: pathspec 'EKON15-Renaissance-Hotel-D\374sseldorf' did not match any files
      
  5. a

So git could:

  • detect the directories and files
  • display the names of the detected directories and files
  • not translate back the specified names into directories and files

All if this was with:

$ git --version
git version 1.9.5 (Apple Git-50.3)

This is how I fixed it

First I created an alias:

alias git-config="echo global: ; git config --list --global ; echo local: ; git config --lis --local ; echo system: ; git config --list --system"

That allowed me to view the git settings on various levels in my system.

It revealed I didn’t have the core.precomposeunicode setting at all (valid values are true or false). I also read various stories about one or both being the correct value: osx – Git and the Umlaut problem on Mac OS X – Stack Overflow [WayBack].

 

 

–jeroen

Result of git status:

$ git status .
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add/rm <file>…" to update what will be committed)
(use "git checkout — <file>…" to discard changes in working directory)
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Debugging/BO-EKON15-Delphi-XE2-Debugging.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Unit-Testing/BO-EKON15-Delphi-XE2-Unit-Testing.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Workshop/BO-EKON15-2011-XE2-Wokshop-0-sample-code.txt"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Workshop/BO-EKON15-2011-XE2-Wokshop-1-Delphi-64bit.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Workshop/BO-EKON15-2011-XE2-Wokshop-2-LiveBindings-DataBinding.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Workshop/BO-EKON15-2011-XE2-Wokshop-3-Delphi-VCL Styles.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Workshop/BO-EKON15-2011-XE2-Wokshop-4-Delphi-FireMonkey.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Workshop/BO-EKON15-2011-XE2-Wokshop-5-Delphi-FireMonkey-xPlatform.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-and-XML/BO-EKON15-2011-Delphi-XE2-and-XML.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/XSL-transforming-XML/BO-EKON15-2011-XSL-transforming-XML.pdf"

 

Posted in Development, DVCS - Distributed Version Control, Encoding, git, ISO-8859, Software Development, Source Code Management | Leave a Comment »

Encoding is hard… so how did the single quote become a circumflexed a followed by Euro sign and trade mark?

Posted by jpluimers on 2016/10/04

A while ago (in fact more than a year), I posted Encoding is hard…  go G+ with the below picture.

[Wayback] ftfy (“fixes text for you”, a parody on “fixed that for you”) [Wayback] fixes it, but:

How did the single quote become “’“?

Actually, because of a a common “beautification” of many Office suites (Microsoft and Open alike), the single quote was a special one: a Unicode Character ‘RIGHT SINGLE QUOTATION MARK’ (U+2019) which in UTF-8 is encoded as 0xE2 0x80 0x99.

Read the rest of this entry »

Posted in Development, Encoding, ftfy, ISO-8859, ISO8859, Mojibake, Software Development, Unicode, UTF-8, UTF8, Windows-1252 | Leave a Comment »

Some interesting encoding/Unicode/text articles on kunststube and links for test files of various encodings

Posted by jpluimers on 2016/08/17

After yesterdays post on Testing and static methods don’t go well together, I read around on Source (kunststube [WayBack]) a bit more and found these very nice articles on encoding,Unicode and text:

Related on those, some other nice readings:

–jeroen

Posted in Ansi, ASCII, CP437/OEM 437/PC-8, Development, EBCDIC, Encoding, ISO-8859, ISO8859, Shift JIS, Software Development, Unicode, UTF-16, UTF-8, UTF16, UTF8, Windows-1252 | Leave a Comment »

 
%d bloggers like this: