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 195155 - I18N: Export Diff is opened in editor with default encoding but better to use mercurial.encoding
Summary: I18N: Export Diff is opened in editor with default encoding but better to use...
Status: VERIFIED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2011-02-08 04:27 UTC by Masaki Katakai
Modified: 2011-02-09 06:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2011-02-08 04:27:03 UTC
I understand "mercurial.encoding" property was introduced to control encoding for commit message in bug 155147. But it seems that it works just for commit message. I got the report from Japanese community user that it does not work at Export Diff.
Output from Export Diff are garbled around Japanese strings.

1. Start NetBeans with -J-Dmercurial.encoding=UTF-8 on Japanese Windows
   OS native encoding is Shift_JIS so he wanted to use UTF-8 in commit
   message.

2. Set project encoding to UTF-8

3. Commit some files with Japanese comments.
   It's stored in UTF-8.

4. Show History

5. Check one changeset and Export Diff

Comment messages are garbled in diff file. It seems that NetBeans uses OS native encoding, in this case, Shift_JIS.

I think "mercurial.encoding" should be used in this case too. What do you think?
Comment 1 Masaki Katakai 2011-02-08 05:09:27 UTC
I'm very sorry that my observation was not correct. The file encoding of patch is UTF-8 but NetBeans tries to open it as Shift_JIS. So it's garbled.

I understand that file outside NetBeans project is loaded as default encoding (in this case Shift_JIS.

I changed the subject.

If there is good solution, please fix.
Comment 2 Ondrej Vrabec 2011-02-08 08:18:43 UTC
fix: http://hg.netbeans.org/core-main/rev/1916a2564cff
Comment 3 Ondrej Vrabec 2011-02-08 08:19:33 UTC
Please try'n verify the fix as soon as possible.
Comment 4 Quality Engineering 2011-02-09 06:07:02 UTC
Integrated into 'main-golden', will be available in build *201102090000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/1916a2564cff
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #195155 - I18N: Export Diff is opened in editor with default encoding but better to use mercurial.encoding
Comment 5 Masaki Katakai 2011-02-09 06:53:52 UTC
Great!

Thank you very much for fixing it quickly! I verified the fix in build 201102090000.