Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to copy non-ascii chars from file to buffer ????

vipulgondaliavipulgondalia Posts: 19Member
Hye friends,
I want to read header of DBF files and then store it in buffer (arrays of chars). I have done this thing already. I have done this as :

FileStream f = new FileStream(filename,FileMode.Open,FileAccess.Read);
BinaryReader br = new BinaryReader(f);
br.BaseStream.Position = 0;
cbufferi = br.ReadChars(1000);

Now cbufferi contains 1000 characters from mentioned DBF file BUT it doesnot contains some intermediate characters which has it's ascii value greater than 127(0x7F).I know that ascii chars have values maximum as 127 but my DBF files contains some special chars having value greater than 127(0x7F). cbufferi simply NEGLECT this kinds of characters while copying. Hence it creates problems while I am trying to retrieve Fields by using formulaes like :

flds[fldx][j] = cbufferi[((i+1)*31) + j];

So is there any other method so that I can able to copy special character (ascii greater than 127) in BUFFER cbufferi ????

Thanks in advance..
Sign In or Register to comment.