将图像类型转换为文本

时间:2017-11-13 14:58:24

标签: sql sql-server tsql

我在将以下图片数据类型转换为文字时遇到了一些问题;

0x1F8B0800FC7E1F3000FF758FCB6EC2301045F748FCC3FC00D524518A0AAB967655D10D5D7AE324E360C9B1A3B179B4887FAF431254FAD8F83173E6DE3B27C14125425AAF2F47D9D6499AA742B16B021D03888A94C29350CE865098E9243E51287FD0DEC3236B6996E74B3111AA7115B18595DBB12686373A0CBDA867B511AADC4AF61452D87C34851B27B371F20AE0ADC6052B9D711C1308A60A45CD441645617684CB5FA534CF3B6DB12B13D14AAE446BA4B6DD2A4116D93D42BF438AF0BE2558EB929D772AC0CB3106B035C186781FDDD7529BC21DE36D651DFF5BE9A1744D6B2850052DBB92BCD7B686A607C97776D3C92648EE081916223A428A389FE1C30C73C07C91CD17E9BC075757B17FD12CEFD1F56831FA52354C0CFD588A213D346E3FB67088A33F099CEA3BD00CE080DC21C2EB530F3E531FE60772AB52FD0D7DD7397F01A585816657020000

我尝试将其转换为varbinary,然后将其转换为nvarchar,但获取看起来像Unicode字符的内容;

select top 1 cast(cast(body as varbinary(max)) as nvarchar(max)) from dbo.messagedata

enter image description here

如何将上述图像数据转换为可读文本?

0 个答案:

没有答案