Ho to convert BLOB data to readable format
-
when i extracted BLOB data from database i can see like this in my word doc. how to convert it to readable format? o � 8 A+ ¬ 2 e � o � ¬ 2 e o � Cleveland, OH : & + & % / . H F 2 e ( o � �) � o ' �� � �� � @ Garamond - 2 2 � P o � Management Trainee ProgramZ 0 7 0 6 / S /
-
when i extracted BLOB data from database i can see like this in my word doc. how to convert it to readable format? o � 8 A+ ¬ 2 e � o � ¬ 2 e o � Cleveland, OH : & + & % / . H F 2 e ( o � �) � o ' �� � �� � @ Garamond - 2 2 � P o � Management Trainee ProgramZ 0 7 0 6 / S /
That depends on what it is! :laugh: If it's a Word document, then save it as a .DOC or .DOCX file, and get Word to open it. Presumably, when you saved the data you also saved a file name with it?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
That depends on what it is! :laugh: If it's a Word document, then save it as a .DOC or .DOCX file, and get Word to open it. Presumably, when you saved the data you also saved a file name with it?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
Yes correct..i am saving it as .DOC when i am opening, it is asking conversion from "Encoding text" and when i select "Unicode" it is displaying like that
-
Yes correct..i am saving it as .DOC when i am opening, it is asking conversion from "Encoding text" and when i select "Unicode" it is displaying like that
Try an experiment: upload a known-working file, and then save it as a different name. Compare the two and see if there are any differences. If there are, then you need to start by looking at how you are storing it and make sure that works first. But...DOC files aren't all Unicode - they can be a binary format, so doing an Unicode conversion is probably going to mess them up.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
when i extracted BLOB data from database i can see like this in my word doc. how to convert it to readable format? o � 8 A+ ¬ 2 e � o � ¬ 2 e o � Cleveland, OH : & + & % / . H F 2 e ( o � �) � o ' �� � �� � @ Garamond - 2 2 � P o � Management Trainee ProgramZ 0 7 0 6 / S /
Chances are that even inside your Word document and this web page there are many things that messed up the format, made it even worse. The binary object that you captured was indeed an array of bytes containing the data (I won't say it was initially a Word document) with a format to be taken care of while converting back to a valid file. That is why whenever you store a file in the image type (in SQL image is the binary data, not the image you know) you also store the file extension or MIME type (the thing you know as "application/json" etc.). They are used to convert that data back to files. When you copied the data, it was not of Word format, every file has its own structure that is followed when converting the bytes back to a representation of the file. Word was not able to convert it back to actual representation, in which case it showed you that broken format. Notice that most of the content, such as those characters were easily mapped and thus they were shown to you, but a few other stuff was not mapped. Simple as that. :-)
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
Chances are that even inside your Word document and this web page there are many things that messed up the format, made it even worse. The binary object that you captured was indeed an array of bytes containing the data (I won't say it was initially a Word document) with a format to be taken care of while converting back to a valid file. That is why whenever you store a file in the image type (in SQL image is the binary data, not the image you know) you also store the file extension or MIME type (the thing you know as "application/json" etc.). They are used to convert that data back to files. When you copied the data, it was not of Word format, every file has its own structure that is followed when converting the bytes back to a representation of the file. Word was not able to convert it back to actual representation, in which case it showed you that broken format. Notice that most of the content, such as those characters were easily mapped and thus they were shown to you, but a few other stuff was not mapped. Simple as that. :-)
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
Ya correct..few content not mapped and some of the content mapped..tried dfferent options from Word ponit of view..but no luck
-
Ya correct..few content not mapped and some of the content mapped..tried dfferent options from Word ponit of view..but no luck
Was the file initially of Word format (.doc or .docx; Rich Text Format is a separate case)?
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
Was the file initially of Word format (.doc or .docx; Rich Text Format is a separate case)?
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
Yes..I am sure..its .DOC only..
-
Yes..I am sure..its .DOC only..
I would recommend that you create the file using the stream (read the binary data using the SELECT) and then convert the stream (of binary data) to a file. In simple words, follow what OriginalGriff said above. :)
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~