XML Parsing - ␍ Charater (Carriage Return)

Hi, 

I've got an XML file containing the carriage return character "␍" in it, and my Trados Studio 2024 parses the character as translatable text. Is there a way to parse it as an actual line break, carriage return, etc.?

This is what I usually see in the editor in Trados Studio:

CarriageReturn character in xml file

I've tried adding a segmentation rule to the translation memory. Now the text is segmented after the character (so far, so good), but it still parses the character as translatable text:

CarriageReturn in XML file plus segmentation

I'va had a look at some threads in the forum but couldn't solve my issue. Any suggestions would be greatly appreciated!

sample.xml.zip



Added sample file
[edited by: 211127 at 1:20 PM (GMT 1) on 7 May 2025]
emoji
Parents
  • Thank you for looking into this, Paul! I contacted the people who provided the problematic XML file and asked them if they could fix this in the source. However, I also want to see if I can solve this in Trados Studio.

    Your result looks perfect and is exactly what I was looking for: A clean solution using only the file type setting, without additional segmentation rules in the TMs.

    I followed the steps you described but couldn't get it to work on my system. This is how I configured my file type:

    1. Detection

    Trados Studio Settings XML File Type Detection

    2. Parser

    Trados Studio Settings XML File Type Parser

    3. Embedded Content Processing

    Trados Studio Settings XML File Type ECB

    This is the result I now get with the sample XML file (with no custom segmentation rules in the TM):

     Screenshot showing a text editor with two lines of text. Purple tags are visible within the text, indicating segmentation or placeholders.

    Any ideas, what I might be missing?

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 6:32 AM (GMT 1) on 8 May 2025]
Reply
  • Thank you for looking into this, Paul! I contacted the people who provided the problematic XML file and asked them if they could fix this in the source. However, I also want to see if I can solve this in Trados Studio.

    Your result looks perfect and is exactly what I was looking for: A clean solution using only the file type setting, without additional segmentation rules in the TMs.

    I followed the steps you described but couldn't get it to work on my system. This is how I configured my file type:

    1. Detection

    Trados Studio Settings XML File Type Detection

    2. Parser

    Trados Studio Settings XML File Type Parser

    3. Embedded Content Processing

    Trados Studio Settings XML File Type ECB

    This is the result I now get with the sample XML file (with no custom segmentation rules in the TM):

     Screenshot showing a text editor with two lines of text. Purple tags are visible within the text, indicating segmentation or placeholders.

    Any ideas, what I might be missing?

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 6:32 AM (GMT 1) on 8 May 2025]
Children