My programs searches the header of input barcode in index file. Get the
record position next to Barcode header. Then moves the file pointer of
products file to reach that record.
My products file contains records as follows:
9N-F1T0153|002002820327|Data Switch|EA|00030900|00000
36-EPSON7753|010343600003|Ø*نمبر طابعه 500/570|EA|00001200|00000
ER-270019|013388270019|بقتال الشارع|EA|00019900|00000
while index file for this products file contains the indexes of each barcode:
format: BarcodeHeader (space) RecordStartPosition
00200282 0
01034360 55
01338827 121
for first two records file pointer is working file and i can get whole
record by ReadLine(). But from the 3rd record i don't get the whole record
but a part. i realized that this is due to Arabic Text(Unicode Characters)
that exists in second record and therefore file pointer
If the file don't have Arabic Text(Unicode Character) then everything works
fine.
Code Snippet:
this.sr_FmtdFile.DiscardBufferedData();
this.sr_FmtdFile.BaseStream.Position = 0;
this.sr_FmtdFile.BaseStream.Seek(index , SeekOrigin.Begin);
while( (record = this.sr_FmtdFile.ReadLine()) != null )
{
//Code to get desired record.
}
Please help how to handle Arabic Text(Unicode Character) in file pointer
movement.
Arif.