Question about files and String

G

Guest

Hi,
i have a dataSet which i take customers details and write them to a file.
the details contain numbers ,hebrew and english letters. i need the details
to be written in a specific way, now i have a problem that when i enter
numbers then letters then number again, the order which i entered the details
is broken, how can i keep the order to stay like i wrote it to be?
first i collect all the details and enter them to a temporary string (i.e:
temp_str=temp_str+new_line) and in the end i'm writing the final string to a
file.

another problem i'm having is that if i want to open the file i created with
wordpad i see the hebrew letters as gibberish but if i open it with NotePad i
see it ok, why is that?

thanks,
Gidi.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Not quite understand how the order of the line is broken or changed for that
matter. can you show a code snippet of it?

Tip:
collect your details using StringBuilder , not concatening strings!!! the
latter is very costly performance wise.

What encoding r u using?

probably the problem is that wordpad does not know how to handle the
encoding and notepad does.


cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top