Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.15k stars 301 forks source link

Changebar always shown in every Chinese comment #2380

Open ghost opened 7 years ago

ghost commented 7 years ago

Short Summary

Changebar always shown in every Chinese comment

Steps to Reproduce

Python code with Chinese comment charset: utf-8

Expected results

No changebar shown in every Chinese comment

Actual results

Changebar always shown in every Chinese comment, even after a commit action. Click the changebar ,old line is gibberish and new line is normal

Platform Information

Komodo Edit or IDE? IDE Komodo Version? 10.2 Operating System (and version)? Win 10

Additional Information

mitchell-as commented 7 years ago

Hi, thanks for the report. Would you please attach a file that contains a Chinese comment that exhibits the problem? (It doesn't have to be the entire file.) An attachment is preferred, as pasting a snippet into a Github comment may mangle it in some way. Thank you.

ghost commented 7 years ago

chinese comment.txt

mitchell-as commented 7 years ago

@cgchoffman Can you reproduce this on your Windows machine? On Linux I cannot. I suspect it's a Windows encoding-type of issue.

th3coop commented 7 years ago

No issue for me. I'm assuming we're talking about the Track Changes column in the scintilla gutter? Track changes behaved as expected.

The filed opened as UTF-8.

ghost commented 7 years ago

Operating System (and version)? Win 10 Chinese version. Maybe this is the cause.

Naatan commented 7 years ago

@glados01 is your file encoding set to UTF-8?

ghost commented 7 years ago

@Naatan Yes

Naatan commented 7 years ago

What version control system are you using (if any)?

ghost commented 7 years ago

git version 2.11.0.windows.1

Naatan commented 7 years ago

I just tried the following in a new directory with the file you supplied in it

git init
git add chinese-comment.txt
git commit -m first

Then I opened the file in Komodo and it's showing no modifications. Do those steps reproduce the issue for you?

ghost commented 7 years ago

Yes

Naatan commented 7 years ago

Does running gif diff on a file that's showing changes in Komodo produce anything?

ghost commented 7 years ago

@Naatan No.

Naatan commented 7 years ago

We'll see if anything stands out in the code as being problematic.

ghost commented 6 years ago

Komodo IDE 11 still has the issue, and chinese characters in show changes dialog are gibberish too.

mitchell-as commented 6 years ago

Hi, this issue has not been resolved yet, so the behavior originally described would still exist. Thanks for your patience.

ghost commented 6 years ago

I think it is about os and Git function. Since you don't have Chinese Win10, so you can't reproduce it.

Naatan commented 6 years ago

Does git diff show a difference in the file too?

ghost commented 6 years ago

You mean in Git Bash? No. But Git diff in Git Bash show Chinese characters as below, and the Chinese characters are normal in Git gui.

<96><95>E.4<94><9A><84>MA<9A>

<84><91><9C><9F>
Naatan commented 6 years ago

You say the issue happens after a commit, does that mean you need to have made the actual change in question first, then committed it? Or does it happen on all comments in a file regardless of whether they have been changed in the commit?

ghost commented 6 years ago

I mean the issue is always there, even after a commit. Track changes bar and show changes dialog just can't handle Chinese characters correctly.