How to change file encoding in SSIS (UTF8, ASCII or UTF16)

Introduction

Many times during your ETL process you receive files which are in different encoding than you expect. Example all files are in UTF-16 format but your application expect them to be in UTF-8. Or Sometimes files are in ASCII format and you want to convert to UTF-8.

In this post you will see how to use Advanced File System Task to convert multiple files into desired encoding (e.g. ASCII, UTF-8, UTF-16).

Steps to Convert file encoding for Multiple Files in SSIS

  1. Download and Install SSIS PowerPack
  2. From you SSIS Toolbox drag Advanced File System Task
  3. Double click task to configure it
  4. Select “Change Encoding of files” action from dropdown as below screenshot
  5. Enter path or pattern for source file you want to convert to different encoding
  6. Select desired encoding from Encoding dropdown (e.g. if you files are in ASCII and you want to convert them to UTF-8 .. just select UTF-8)
  7. Execute package and observe SSIS execution log to find out which files are converted to new encoding.
Change file encoding using SSIS Advanced File System Task

Change file encoding using SSIS Advanced File System Task

Change file encoding to UTF-8 from ASCII using SSIS Advanced File System Task

Change file encoding to UTF-8 from ASCII using SSIS Advanced File System Task

SSIS Execution log - Convert  files to UTF-8 using SSIS Advanced File System Task

SSIS Execution log – Convert files to UTF-8 using SSIS Advanced File System Task

 

Posted in SSIS Advanced File System Task and tagged , .