Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352775

Summary: The function registerFileEncoding in FileEncodingRegistry should check default encoding first
Product: [Tools] CDT Reporter: John Liu <jwsliu>
Component: cdt-indexerAssignee: Vivian Kong <vivkong>
Status: RESOLVED FIXED QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, vivkong
Version: 8.0   
Target Milestone: 8.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
this is teh git patch
cdtdoug: iplog+
a patch to add a getter function cdtdoug: iplog+

Description John Liu CLA 2011-07-21 11:16:06 EDT
The function registerFileEncoding(String filename, String encoding) in FileEncodingRegistry class should check if the given encoding equals the default encoding.
Comment 1 John Liu CLA 2011-07-21 11:19:06 EDT
Created attachment 200101 [details]
this is teh git patch

Please let me know if the code change has any problems. Thanks
Comment 2 Vivian Kong CLA 2011-07-21 11:25:23 EDT
I'll take a look
Comment 3 Vivian Kong CLA 2011-07-21 11:53:37 EDT
Applied to cdt_7_0, cdt_8_0 and HEAD.  Thanks John.
Comment 4 CDT Genie CLA 2011-07-21 12:19:23 EDT
*** cdt git genie on behalf of 352775 ***

    Bug 352775 - The function registerFileEncoding in FileEncodingRegistry
    should check default encoding first

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=525d976ae7aed53c563bb9ed664a63f468b6d80f
Comment 5 CDT Genie CLA 2011-07-21 12:19:25 EDT
*** cdt git genie on behalf of 352775 ***

    Bug 352775 - The function registerFileEncoding in FileEncodingRegistry
    should check default encoding first
    Change-Id: I33b736103707dfcb3848d1d1671487c7b1995e77

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=f636cb6bcce395b2bbbd0d4402c9c340f4ae75d1
Comment 6 CDT Genie CLA 2011-07-21 12:19:27 EDT
*** cdt git genie on behalf of 352775 ***

    Bug 352775 - The function registerFileEncoding in FileEncodingRegistry
    should check default encoding first
    Change-Id: I33b736103707dfcb3848d1d1671487c7b1995e77

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=62c3d22313b44edf792f16ee24aec47d7e447ed4
Comment 7 John Liu CLA 2011-07-22 10:25:24 EDT
Created attachment 200192 [details]
a patch to add a getter function

A default encoding getter is also needed, so I update the patch. Vivian, could you please check and commit the code change into git? Thanks.
Comment 8 Vivian Kong CLA 2011-07-22 11:16:27 EDT
(In reply to comment #7)
> Created attachment 200192 [details]
> a patch to add a getter function
> 
> A default encoding getter is also needed, so I update the patch. Vivian, could
> you please check and commit the code change into git? Thanks.

Applied to cdt_7_0, cdt_8_0 and HEAD.
Comment 9 CDT Genie CLA 2011-07-22 11:19:18 EDT
*** cdt git genie on behalf of 352775 ***

    Bug 352775 - The function registerFileEncoding in FileEncodingRegistry
    should check default encoding first

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=d903ce67bfb2c293acd3baeb47d2cae471197824
Comment 10 CDT Genie CLA 2011-07-22 11:19:21 EDT
*** cdt git genie on behalf of 352775 ***

    Bug 352775 - The function registerFileEncoding in FileEncodingRegistry
    should check default encoding first
    Change-Id: Ie30c9b8a0db79719cb3587f368898c66f971f075

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=d65911d15c302710445004857765ea0b11fe939b
Comment 11 CDT Genie CLA 2011-07-22 11:19:26 EDT
*** cdt git genie on behalf of 352775 ***

    Bug 352775 - The function registerFileEncoding in FileEncodingRegistry
    should check default encoding first
    Change-Id: Ie30c9b8a0db79719cb3587f368898c66f971f075

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=ba139d80802b1c4a5c8f34574f9da496b9306350
Comment 12 John Liu CLA 2011-08-05 11:04:57 EDT
Vivian, Can you please backup the change in my 2nd patch (attachment 200192 [details])? as it breaks the compatibility. Thanks.
Comment 13 Vivian Kong CLA 2011-08-05 15:15:33 EDT
(In reply to comment #12)
> Vivian, Can you please backup the change in my 2nd patch (attachment 200192 [details])?
> as it breaks the compatibility. Thanks.

Change backed out - cdt_7_0, cdt_8_0 and master.
Comment 14 CDT Genie CLA 2011-08-05 15:23:12 EDT
*** cdt git genie on behalf of Vivian Kong ***

    bug 352775 - Back out 2nd patch as per John's request
    Change-Id: I590d2dc8f6972b9bfbe2c2b7415bf7b512a099f7

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=c9d1bba00b45fe36210f1079adbc67e74ec0d989
Comment 15 CDT Genie CLA 2011-08-05 15:23:13 EDT
*** cdt git genie on behalf of Vivian Kong ***

    bug 352775 - Back out 2nd patch as per John's request
    Change-Id: I590d2dc8f6972b9bfbe2c2b7415bf7b512a099f7

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=ebcbdcf6c5522c834c7c70e27a59257ef636026c