Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: CS4 Tagged Text File Imports as Plain Text #56162
    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

    in 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

Viewing 2 posts - 1 through 2 (of 2 total)