I want to create a CSV file importer on my website. I want the user to select a delimiter.
The problem is when the form is submitted, the separator field is stored as "\ t", for example, so when I parse the file, I look for the string "\ t" instead of the real TAB. It does the same with every special character such as \ r, \ n, etc.
I want to know a method or function to convert these characters to their true representation without using an array like:
- 't' => "\ t"
- 'r' => "\ r"
- ...
Marm source share