# Problem with Fixed Length Parser

**URL:** <https://forum.cloverdx.com/t/problem-with-fixed-length-parser/179>\
**Category:** CloverDX Platform\
**Created:** [July 16, 2007, 12:00am UTC](https://forum.cloverdx.com/t/problem-with-fixed-length-parser/179 "2007-07-16T00:00:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oldforum](https://avatars.discourse-cdn.com/v4/letter/o/13edae/32.png) [@oldforum](https://forum.cloverdx.com/u/oldforum)\
**Post date:** [July 16, 2007, 12:00am UTC](https://forum.cloverdx.com/t/problem-with-fixed-length-parser/179/1 "2007-07-16T00:00:00Z")

</div>

Problem with Fixed Length Parser

---

<div class="post-metadata">

**Author:** ![oldforum](https://avatars.discourse-cdn.com/v4/letter/o/13edae/32.png) [@oldforum](https://forum.cloverdx.com/u/oldforum)\
**Post date:** [July 16, 2007, 8:23am UTC](https://forum.cloverdx.com/t/problem-with-fixed-length-parser/179/2 "2007-07-16T08:23:44Z")

</div>

Try to use option OneRecordPerLine for FIX\_LEN\_DATA\_READER\_NIO or defined additional dummy field at the end of type string and size 2 - this one will get assigned those two extra characters (DOS/Windows style line end).

if you are using directly org.jetel.data.FixLenDataParser2, call setOneRecordPerLinePolicy(true) on it befor calling getNext().

---

<div class="post-metadata">

**Author:** ![oldforum](https://avatars.discourse-cdn.com/v4/letter/o/13edae/32.png) [@oldforum](https://forum.cloverdx.com/u/oldforum)\
**Post date:** [July 16, 2007, 8:23am UTC](https://forum.cloverdx.com/t/problem-with-fixed-length-parser/179/3 "2007-07-16T08:23:45Z")

</div>

One more thing - try to download the latest version as this behaviour has been changed recently.

---

<div class="post-metadata">

**Author:** ![oldforum](https://avatars.discourse-cdn.com/v4/letter/o/13edae/32.png) [@oldforum](https://forum.cloverdx.com/u/oldforum)\
**Post date:** [July 16, 2007, 8:23am UTC](https://forum.cloverdx.com/t/problem-with-fixed-length-parser/179/4 "2007-07-16T08:23:46Z")

</div>

I am trying to parse the Fixed length data file with the class FixLenDataParser2. The \n\r characters are being added to the first filed of next record.

API documentation:Parsing fix length data. It should be used in cases where new lines separate records.

I doesn’t work the way it is documented. Is there any work around to get rid of the problem.
