Community perspective: Flat-file Data Load - CSV Encoding Issues

edited December 2023 in Blog

Problem: In the same way we cannot load .txt files (usually tab-delimited) through a data load action originally created with a .csv (comma delimited file), trying to load .csv files with different encoding parameters can result in an issue too.

This is the error message you will get in both cases (attempting to load a .txt or a .csv with different encoding):

It is easy to check the type of file that was originally used to create the action, so we can easily spot if we are trying to load a .txt through an action created with a .csv:

How do we know the encoding of the .csv file? Just go to “import data sources” in your Anaplan model and “edit” the data source:

Note: if the original file expired, you won't be able to edit the Data Source, but you can click on “New Source” and re-upload the file again.

In the “Edit” menu, you will see the “Text Encoding” of the file used to create the data load action. Note: by default Anaplan uses ISO-8859-1.

But when a file with a different encoding was used to create the action, a different parameter can be shown:

Why would you use different encoding? let me introduce you to the “special characters”. You can find plenty of information over here:

How do I know the text encoding used by the file I am attempting to load?

If you are creating the file yourself from an excel, you will be presented with a couple of options:

Generally speaking*:

  1. the first one “CSV UTF-8” will work with the “UTF-8” text encoding option for the Anaplan action.
  2. the second one “CSV” will work with the text encoding option “ISO-8859-1”

If you are not the one creating the .csv file, you can use Notepad++ to check the encoding of any file. Just open Notepad++ and drag your .csv file on it. On the bottom-right corner you will see the encoding:

Bringing together Anaplan - Excel - Notepad++

Now, in my experience Anaplan - Excel - Notepad++ do not use exactly the same naming convention, at least not as expected, so I have created the following table to understand what encoding to use in every case:

*CSV is not a standardised format and changes across regions, this article has been written using default settings as “English - United Kingdom". You can learn more about CSV encoding in the following sites:

I hope this post helps when dealing with .csv files.