Yes, I know, there are many already existing solutions for writing a CSV file in Delphi. And some are probably better than mine (for general purpose usage), but those I looked at had too many shortcomings for my particular use case, so I wrote my own. (There might also have been some not invented here syndrome involved.)
Note that I have tested it only with Delphi 2007 so far (because I needed it for Delphi 2007). There might be Unicode related bugs that only surface in later versions.