Back

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

  • You must be logged in to reply to this topic.Login

CS4 Tagged Text File Imports as Plain Text

Return to Member Forum

  • Author
    Posts
    • #56079
      Rick Quatro
      Member

      I received a tagged text file from a client. When I import it into InDesign CS4 on Windows, I get the Text Import Options dialog box instead of the Tagged Text Import Options dialog box. If I open the file with a text editor and copy and paste the text into a blank document and save it as text, the new file then imports as Tagged Text. Any idea what might be happening? Thank you very much.

      Rick

    • #56082

      Strange behavior, but it must be somehow related to the way the original document was saved.

      Perhaps it's something as opaque as the exact text encoding: UTF-8, Unicode, a Unicode marker at the start that should not be there — or the reverse, starting with a Unicode marker while poor ID can't handle that.

      Perhaps it's the platform-defined line endings: just a Carriage Return (Windows style), just a Line Feed (Mac/Unix style) (I might have mixed them the wrong way around), or even CR/LF pairs (uhm — very old MSDOS style).

      Reason it works when re-saved on your computer (what type?) would be your plain text editor is smart enough, on the one hand, to automatically recognized the original file encoding, and on the other hand, to save it the way your ID likes it.

      Actually, no way to tell without using a Hex File Viewer on one of the original files; and even then, no way to make ID read the originals … Not without signalling the problem to Adobe and awaiting an update.

      (If so: Good luck trying to convince Adobe's poorly Tech Support it is a problem, as their default answer is “User error”, followed by shrugging off any follow-ups you might try with “Problem was solved per our previous mail”. Yeah, been there & done that!)

    • #56125

      Had the same thing in CS3 – someone finally worked out that you had to change the line endings to “Unix”. This was despite the fact that the file had never been close to a Unix computer. I used TextWrangler (Mac) to see/change the line endings and which flavour of Unicode encoding.

      So, I'd try tinkering with the line endings first.

      The settings that worked for me on the Mac are:

      Line endings = Unix (LF)

      Encoding = Unicode (UTF-16 Little-Endian)

      Good luck!

    • #56126

      Good tip! (Perhaps an oversight from Mac based Adobe programmers?)

      Helios Textpad is a good Windows editor where you can inspect and change the line endings and text encoding.

    • #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

    • #56168

      Interesting. The files I have to change are headed

      <UNICODE-MAC>

      <vsn:5><fset:InDesign-Roman>

      and still I have to change the line endings to a Unix-style LF before importing them on a Mac. It took someone ages to work this out, so I suspect there might be some inconsistency within InDesign that means you just have to experiment until it goes right.

Viewing 5 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads