Reply To: CS4 Tagged Text File Imports as Plain Text

Home Page / Forums / General InDesign Topics (CLOSED) / CS4 Tagged Text File Imports as Plain Text / Reply To: CS4 Tagged Text File Imports as Plain Text

#53126
Rick Quatro
Member

Thanks for the help. The problem is indeed with the line endings. The tagged text file is generated programmatically on a Windows machine and targeted for import into the Mac version of InDesign. The first line is <ASCII-MAC> so apparently the tagged-text parser is expecting carriage returns for line endings. If it has Windows line endings (CR+LF), it gets treated as a plain text file on import instead of a tagged text file.

The solution was to modify the Windows application that generates the tagged text file to use CRs for line endings. Now it imports correctly as tagged text.

For anyone generating tagged text with VB.NET, here is how you can change the default line endings for a StreamWriter:

Dim fsOut = New FileStream(outFile, FileMode.Create, FileAccess.Write)
Dim textOut = New StreamWriter(fsOut)
textOut.NewLine = ControlChars.Cr

Thanks again for the help.

Rick

This article was last modified on June 23, 2010

Comments (0)

Loading comments...