tags:

views:

563

answers:

3

Hi!

I'd have some blob data such as:

0x3333332c2044e963617269652c20356520e9746167650d0a53742d4c617572656e7420285175e9626563292048344e20334d390d0a

that I'd like to convert to text because the new database has text field instead of blobs and now it makes trouble with some accentuated characters.

Is there somekind of blob to string converter somewhere?

Thanks a lot!

A: 

Try:

CONVERT(blobname USING latin1)
Kyle Rozendo
Try that where? I said I have a mysql export a text file with inserts in it... Thanks anyways :)
Tom
+1  A: 

It depends on what the blob is. For example, I've dealt with some blobs that could be represented as basic XML files. Those would have been relatively easy to convert. However, I dealt with other blobs that were image files. If you tried to represent them as text you'd lose data.

What are in your blobs?

SOA Nerd
A: 

However if the data contains simple byte stream (that is, unstructured data, files, audio, video, whatever) and you need to represent them as pure ASCII you could change into a Base64 string.

Paulo Santos