Uploaded image for project: 'Content Translation Support'
  1. Content Translation Support
  2. MGNLCTS-97

Can't import UTF-8 file with BOM

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Neutral
    • None
    • 2.1.8
    • None

    Description

      TL;DR: Import of a translated XLIFF file fails when it has a BOM (byte order mark).

       

      So, we have hired a translation company that receives XLIFF files from us and we import them back to Magnolia. Unfortunately the import failed with this error:

      [Fatal Error] :1:1: Content is not allowed in prolog.

      After a bit of debugging and googling I found this on SO:

      https://stackoverflow.com/questions/5138696/org-xml-sax-saxparseexception-content-is-not-allowed-in-prolog#7697281

      So I quickly converted the files from UTF-8 BOM to UTF-8 and the import worked.

      Now, we don't like to manually convert files back and forth and also I see this clearly as a bug, because a BOM should be allowed. Can you please take a look at your implementation and try to handle the file with a BOM?

       

      Regards,

      Christian

       

       

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              christian.hamm@elekta.com Christian Hamm
              AuthorX
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD