Problem with Binary data display on MSSQL

[expired user #8934]'s profile image [expired user #8934] posted 8 years ago in General Permalink

Hi, I'm using Heidi v9.3.0.5041 (64bit) on MSSQL Server 2012.

I'm having a simple table with two Binary columns and one id column. The problem is that Heidi shows wrong data for binary column (mostly 0x3F's and shorter than expected). See comparison between Heidi and SQLServer management studio attached.

This definitely looks like a bug.

2 attachment(s):
  • heidi_binary
  • sql_studio
[expired user #8934]'s profile image [expired user #8934] posted 8 years ago Permalink

Can I provide anything else that could be of help in investigating this issue?

ansgar's profile image ansgar posted 8 years ago Permalink

I guess no. Looks like some decoding issue in MSSQL mode. In MySQL mode that works as expected.

[expired user #9849]'s profile image [expired user #9849] posted 8 years ago Permalink

Any progress on this issue? It is also affecting 'Image Preview' and 'Save BLOB to file...'

What decoding on a (VAR)BINARY column - you don't decode BINARY data ...yet it looks like HeidiSQL thinks it's UTF-8 or something alike I'm using VABINARY(max) column to store GIF images and just noticed that 7bit ASCII is OK its mostly 8 bit characters that are wrong e.g. GIF89aÈ. becomes GIF89aÈ. yes that's a byte longer because 8-bit È => È ..or it could be that Export also applies a set of its own bugs

Here first 16 bytes for comparison (good /SquirrelSQL/ vs bad /HeidiSQL/ data)

4749 4638 3961 C800 3C00 F500 0002 0202 GIF89aÈ.[.õ.....
4749 4638 3961 C388 003C 00C3 B500 0002 GIF89aÈ.[.õ...

and how it is interpreted by HeidiSQL

4749 4638 3961 C8   003C 00F5   00 0002 0202
4749 4638 3961 C388 003C 00C3B5 00 0002 0202

HTH

[expired user #9849]'s profile image [expired user #9849] posted 8 years ago Permalink

Yes it is exactly 2 byte sequences in UTF-8

The question remains - Why BINARY data is converted to any encoding? If it is just for visualizing then why 'Save BLOB to file' is broken too?

[expired user #9928]'s profile image [expired user #9928] posted 8 years ago Permalink

Same on me.

Usually I see some 0x3F values (question mark)

2 attachment(s):
  • SQL_Server_Man_Studio
  • heidisql

Please login to leave a reply, or register at first.