TSV to CSV
Input
id city
1 London, UK
2 ParisOutput
id,city
1,"London, UK"
2,ParisThe value containing a comma is now quoted, so the column boundary stays correct.
Going from TSV to CSV means introducing quoting. Once a comma becomes the delimiter, any value that already contains a comma has to be wrapped in double quotes, and any double quote inside a value has to be doubled.
This is the direction that requires care rather than the other, because getting the quoting wrong produces a file that appears to load but has silently shifted columns.
Each example below is executed against this tool by the test suite, so what you see is what the tool actually produces.
Input
id city
1 London, UK
2 ParisOutput
id,city
1,"London, UK"
2,ParisThe value containing a comma is now quoted, so the column boundary stays correct.
The details that decide whether a conversion is correct, and where information can be lost without any error being raised.