XMLPort doesn't recognize carriage return characters

JGVJGV Member Posts: 2
edited 2023-02-09 in NAV Three Tier
Hi, developers:

I'm working in a XMLPort in BC version 20. This XMLPort has next properties:

Direction = Import;
TextEncoding = UTF8;
Format = VariableText;
FieldDelimiter = '<none>';
FieldSeparator = '<TAB>';
UseRequestPage = false;


At the end of each line of .txt file there are LR and CR characters. However, when object is executed, all file is read in one line beacause carriage return characters aren't recognized.

Please, do you know if there are something wrong about XMLport in BC version 20? I worked in a similar XMLPort before in version 16 and it's working correctly.

Thank you

Best Answer

  • vaprogvaprog Member Posts: 1,144
    Answer ✓
    I beieve FieldDelimiter should be '<None>', not '<none>'

    The property that is really important here is
    RecordSeparator
    
    .
    Please make sure it is '<NewLine>'. If it is not set, it should default to that value. You may, however try to set it explicitely.

    I do not have access to a BC version 20 System right now, so I can't crosscheck.

    Please also make sure your import file has proper NewLine sequeces, ie, 0x0d, 0x0a (<CR>,<LF>) sequences. (not inverted). Also make sure there is not a mix of Unix, Mac, and Windows EndOfLine sequences.

    And finally make sure the file is valid UTF8.

Answers

  • vaprogvaprog Member Posts: 1,144
    Answer ✓
    I beieve FieldDelimiter should be '<None>', not '<none>'

    The property that is really important here is
    RecordSeparator
    
    .
    Please make sure it is '<NewLine>'. If it is not set, it should default to that value. You may, however try to set it explicitely.

    I do not have access to a BC version 20 System right now, so I can't crosscheck.

    Please also make sure your import file has proper NewLine sequeces, ie, 0x0d, 0x0a (<CR>,<LF>) sequences. (not inverted). Also make sure there is not a mix of Unix, Mac, and Windows EndOfLine sequences.

    And finally make sure the file is valid UTF8.
  • JGVJGV Member Posts: 2
    Hi, vaprog:

    You are right, it was about FieldDelimiter property as you said.

    Thank you
Sign In or Register to comment.