Query editor format does not work properly when multi-byte characters exist

kitoram's profile image kitoram posted 8 years ago in General Permalink

Query editor automatically format input text. But when it contains multi-byte characters ,formats are applied between wrong position.

Attached image is when I inputted like below.

select * from "TESTテーブル"
where "製造番号" like '%000245'
and "COLOR_NO" like '%000129'
and "有効フラグ" = 1
1 attachment(s):
  • HeidiSQL_WrongFormat
ansgar's profile image ansgar posted 8 years ago Permalink

Could you please try out a different font for the editor? You can set it in Tools > Preferences > SQL. Either "Consolas" or "Courier New" should be good. I want to find out whether this is a bug in the font or in the application.

kitoram's profile image kitoram posted 8 years ago Permalink

Attached Consolas and Courier New font images. It seems colored positions are calculated by single byte character width.

2 attachment(s):
  • HeidiSQL_WrongFormatConsolas
  • HeidiSQL_WrongFormatCourierNew
[expired user #10483]'s profile image [expired user #10483] posted 8 years ago Permalink

me too. Query editor does not work properly.

2 attachment(s):
  • capture1
  • capture2
ansgar's profile image ansgar posted 8 years ago Permalink

Yes, that looks messy, while it's definitely a bug in the underlying SynEdit component, not directly in the HeidiSQL code.

Could you please try build r5143, as in r5144 I was attempting to work around another SynEdit issue, and probably I caused a new one with my change.

kitoram's profile image kitoram posted 8 years ago Permalink

Build r5143 looks fine for me. When you update SynEdit component to fixed version, I will update HeidiSQL.

Thank you.

1 attachment(s):
  • HeidiSQL_CorrectFormat
Code modification/commit 6e9778c from ansgarbecker, 8 years ago, revision 9.4.0.5149
Revert r5144, which causes more problems than it solves. See
* http://www.heidisql.com/forum.php?t=23009
* http://www.heidisql.com/forum.php?t=23243
* http://www.heidisql.com/forum.php?t=23196
ansgar's profile image ansgar posted 8 years ago Permalink

Build r5149 now takes back my change from r5144, so it should be ok again.

kitoram's profile image kitoram posted 8 years ago Permalink

I tried r5151 build and it seems OK. Thank you.

kitoram's profile image kitoram posted 8 years ago Permalink

Hi,nolan1399 As I posted "Consolas" and "Courier New" images 2weeks ago, thought this issue occured on them. And after ansgar upgraded Component which is used in HeidiSQL, the issue was resolved.

So I think it was not font issue.

Try the newest HeidiSQL, ansgar already fixed it.

ansgar's profile image ansgar posted 8 years ago Permalink

I think nolan1399 was a forum spammer...

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

I creat a view like this: select rq, max(case code when 'A001' then v1 end) as '中国', max(case code when 'B001' then v1 end) as 'bbb', max(case code when 'C001' then v1 else null end) as 'ccc' from test group by rq

i saved and reselect it: select rq, max(case code when 'A001' then v1 end) as '涓浗', max(case code when 'B001' then v1 end) as 'bbb', max(case code when 'C001' then v1 else null end) as 'ccc' from test group by rq

then: '中国'----> '涓浗' i think it seems character decode error. '涓浗'.decode('utf-8')='中国'

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

5126 no problem,my os is chinese win7-32

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