Get the encoding (UTF8 vs UTF16) of a file

Certified Senior Developer

Hi Community,

I'm working in a project where data ingestion is very important and we get data from csv files.

The problem I have at the moment is that with the plug in ps-plugin-ExcelTools in particular with the smart service Import CSV to Database I need to set the charset input (e.g UTF-8 default or UTF-16).

Due to the fact that I could receive files in both encoding format, the question is: Is there any solution to get the encoding of a file? 

I find a solution saving the document in Base64 into Db and analyzing the string obtained. Does anyone have a smarter solution?

Thx in Advance.

Bye bye

  Discussion posts and replies are publicly visible