text data file, it shows ? mark there
Unexpected / unmapped characters found at the end of the fixed-length record at line : 1
text file is having list of body items each length 1288, when giving single line of body record it is passing with length 1287.
Reading the error, looks like the text file contains records of 1287 characters, but the program is expecting records of 1288 characters. To fix the problem, you can either change the record length in the program and ensure that the program can handle records of different lengths or add a padding character to the end of each record in the text file using similar class:
This will add a padding character to the end of each record in the file textdatafile.txt.