distal-attribute
distal-attribute
distal-attribute
distal-attribute

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

kitoram posted 4 months ago in General

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 posted 4 months ago

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 posted 4 months ago

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
kmh357 posted 4 months ago

me too. Query editor does not work properly.

2 attachment(s):
  • capture1
  • capture2
ansgar posted 4 months ago

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 posted 4 months ago

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
ansgar posted 4 months ago

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

kitoram posted 4 months ago

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

kitoram posted 4 months ago

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 posted 4 months ago

I think nolan1399 was a forum spammer...

pqwer99 posted 4 months ago

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')='中国'

pqwer99 posted 4 months ago

5126 no problem,my os is chinese win7-32

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