Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
1.22/5 (4 votes)
See more:
Hi All,
Good Afternoon,

I have a .dat(data file), I have data in that .dat file, I want to convert that ,.dat file data to string(.txt). I converted it successfully.
My problem is how can I convert that string to data file (.txt file data to .dat file data).

The .dat file has this form of data 昀䟼 竾ᩅ蜁䘑Ƃﲰ…耂䘖˨ཅ��䘓ɚ孈⌃䏞͛꘨궅㰃䔋ϯﲈᢆ䟩Л퐌ᡃᄄ䞭ҕ텎ꅆ匄䗐Ӵ쉲效ꔄ


can anyone help me how to convert .txt data to .dat data



Thank&Regards,
Posted

There is no such thing as ".dat" data. This is just a file extension, no more. It can be anything at all; there is no certain data format associated.

So, right now you problem is not defined, and your Question makes no sense. You need to specify data formats in all details.

—SA
 
Share this answer
 
You are getting 昀䟼 竾ᩅ蜁䘑Ƃﲰ…耂䘖˨ཅ��䘓ɚ孈⌃䏞͛꘨궅㰃䔋ϯﲈᢆ䟩Л퐌ᡃᄄ䞭ҕ텎ꅆ匄䗐Ӵ쉲效ꔄ" when you open a .dat file because the file is being opened in text mode. The contents though are same the format of display will be different based on which format you open the file in. ie binary, text etc.

However i came across a thred where the same question as you asked here was asked, and a solution was provided for it in vb. This might help but the thing is, even in that code, the method they followed it extract detail from .txt file and store in .dat file making use of CSng option.

.txt to .dat conversion[^]
 
Share this answer
 
Comments
[no name] 14-Nov-18 10:50am    
how to conver text to SAT
I have xxx.data file with this symbols 昀䟼 竾ᩅ蜁䘑Ƃﲰ…耂䘖˨ཅ��䘓ɚ孈⌃䏞͛꘨궅㰃䔋ϯﲈᢆ䟩Л퐌ᡃᄄ䞭ҕ텎ꅆ匄䗐Ӵ쉲效ꔄ

I converted this data into string (assdfdsghyyfgjhfjkghkfh) using binaryreader.Now again I want convert this string(assdfdsghyyfgjhfjkghkfh)to 昀䟼 竾ᩅ蜁䘑Ƃﲰ…耂䘖˨ཅ��䘓ɚ孈⌃䏞͛꘨궅㰃䔋ϯﲈᢆ䟩Л퐌ᡃᄄ䞭ҕ텎ꅆ匄䗐Ӵ쉲效ꔄ
how can i convert string to this symbols.
 
Share this answer
 
Comments
ZeeroC00l 31-Mar-11 5:09am    
You just need to open a file in binary mode and write the contents to it. That should serve the purpose.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900