AnsweredAssumed Answered

Exporting tab-text with strange/wrong Carriage Return

Question asked by tonimedia on Apr 14, 2016
Latest reply on Jun 1, 2016 by tonimedia


I am having trouble with exporting collected data to a .csv file. The issue already happened in FM 14 on PC and still exists on FM 14 Mac.

I try to explain the problem in an easy example. I have two tables. The first contains different articles:

Bildschirmfoto 2016-04-14 um 08.39.33.png


In the second one I merge the article-informations with Liste(table1::article):

Bildschirmfoto 2016-04-14 um 08.41.24.png


When I export the field "List" as tab-text, ANSI, named as file.csv, I get this result:

TextWrangler: Bildschirmfoto 2016-04-14 um 08.41.37.png

TexteMate: Bildschirmfoto 2016-04-14 um 09.30.40.png


But it should look like this:

Bildschirmfoto 2016-04-14 um 08.41.59.png



The exported file doesn't work when I try to import it on a webserver, because the 4 articles are not separated correctly.

Excel (Mac) forces to crash when trying to open the file.

OpenOffice (Mac) does not recognize the data-seperator.

TextWrangler (Mac) shows a red questionmark (see screenshot above)

TextEdit (Mac) separates the files correctly. But when I save this file in TextEdit, the error is not corrected - after that I have the same issues when opening in TextWrangler or others.

The only solution that works is: opening the .csv with WordPad (Windows XP). The separator is recognized and gets replaced with a correct CarriageReturn. After saving the file from WordPad the file works perfect in any other program. This work-around was used the last five years. But I have to switch from FM 11 (WinXP) to FM 14 (Mac) and every week I have to export 25 different export-files to a Typo3 website. Installing XP on a virtual-machine is a solution - but I hope, it is not the only one !!!


To solve the problem, I have tried different export-methods with different charsets. But Tab-separated Text with ANSI is the one that shows me the best result. The used solution is "a little" more complex as shown above, so using a different way (without saying "List()") will not work.

I tried to exchange the "wrong return" with a different one. Inside of FM the symbol is char(13). I can replace it with any other char - but char(13) is the correct CarriageReturn, that is needed... So exporting char(13) results in a flipped, red questionmark...


Thanks for helping me out