samedi 30 avril 2016

Line break when importing csv to mysql and sqlite

I am importing CSV data to MySQL (using 000webhost) and SQLite. I have data with line breaks in my database as such:

My first line.\nMy second line.

it should print out like this:

My first line. My second line.

I am developing for an Android app to display the results. I get from the database into a TextView and the data that is displayed is shown with \n as such:

My first line.\nMy second line.

Shouldn't it escape \n and print it as a line break instead??

Aucun commentaire:

Enregistrer un commentaire