This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269497 - Garbled characters for sidebar diff and remote Git diff
Summary: Garbled characters for sidebar diff and remote Git diff
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote VCS (show other bugs)
Version: 8.2
Hardware: PC Windows 10 x64
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-06 14:32 UTC by syockit
Modified: 2017-04-13 11:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Use OutputStreamWriter instead of writing char-by-char for the git output (1.59 KB, patch)
2017-01-06 14:32 UTC, syockit
Details | Diff
Use the setting cnd.remote.charset to define the encoding used by RemoteFileEncodingQueryImpl, with fallback to UTF-8 (1.07 KB, patch)
2017-01-06 14:34 UTC, syockit
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description syockit 2017-01-06 14:32:31 UTC
Created attachment 163348 [details]
Use OutputStreamWriter instead of writing char-by-char for the git output

When working with a non-UTF8 file in a remote project that has Git, the sidebar diff shows diff for every line that has non-ASCII characters. The same problem occurs with remote diff (selected from menu Team/Diff/Diff to Base)

The attached patch works as a stopgap for the meantime until we find a way to set encoding for temporary files generated by the IDE (which do not count as project files and hence don't get the project encoding settings applied).
Comment 1 syockit 2017-01-06 14:34:33 UTC
Created attachment 163349 [details]
Use the setting cnd.remote.charset to define the encoding used by RemoteFileEncodingQueryImpl, with fallback to UTF-8
Comment 2 Alexander Simon 2017-03-23 15:47:24 UTC
fixed in enum, change branch release82, changeset 4ded0d4f1014
Comment 3 Quality Engineering 2017-04-02 02:36:00 UTC
Integrated into 'main-silver', will be available in build *201704020002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/79f94762e06b
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #269497 - Garbled characters for sidebar diff and remote Git diff
- add interface to get encoding by file proxy.
(transplanted from fd01d579ac8f05ce3649634a93725f9145bb8993)
Comment 4 ilia 2017-04-13 11:01:25 UTC
https://netbeans.org/bugzilla/show_bug.cgi?id=269497 Changesets:
    http://hg.netbeans.org/releases/rev/fd01d579ac8f # fixing Bug #269497 - Garbled characters for sidebar diff and remote Git diff
    http://hg.netbeans.org/releases/rev/ac086b2e878f # fixing Bug #269497 - Garbled characters for sidebar diff and remote Git diff
    http://hg.netbeans.org/releases/rev/4ded0d4f1014 # fixed Bug #269497 - Garbled characters for sidebar diff and remote Git diff