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

Bug 341973

Summary: files are saved without using default encoding(workspace)
Product: [WebTools] Java Server Faces Reporter: Helio Clementino <helio.jdevel>
Component: CoreAssignee: Ian Trimble <ian.trimble>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: nsand.dev, raghunathan.srinivasan, thatnitind
Version: unspecified   
Target Milestone: 3.3 M7   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Helio Clementino CLA 2011-04-05 22:12:03 EDT
Any file (*.xhtml) that contains a specif word, for example 'faces', as part of a xml namespace are saved using
uft-8 as encoding. Workspace encoding  is setting to use iso-8859-1. Without the refered namespace, files are saved
using workspace encoding.

I used a file with the following lines whose encoding originally was iso-8859-1
and after save the file, the encoding was modified to utf-8 (verified with 
linux command: file -bi sample.xhtml) :

<?xml version="1.0" encoding="ISO-8859-1"?>
<ui:composition
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://faces">       
Ação
</ui:composition>  


-- Configuration Details --
Product: Eclipse 1.3.1.20100913-1228 (org.eclipse.epp.package.jee.product)
Installed Features:
 org.eclipse.wst.xml_ui.feature 3.2.2.v201008170029-7H7AFUQDxumQGOpBqffOY2f1qxDZ
Comment 1 Nitin Dahyabhai CLA 2011-04-06 01:06:35 EDT
File content type is reported as "Facelet".
Comment 2 Raghunathan Srinivasan CLA 2011-04-06 12:48:42 EDT
For review.
Comment 3 Ian Trimble CLA 2011-04-06 16:39:59 EDT
Fix submitted at 2011/04/06 01:39PM PDT.
Comment 4 Ian Trimble CLA 2011-04-07 18:10:00 EDT
Previous "fix" reverted.

Some test scenarios were failing because no valid encoding was discovered for the XHTML content type. We need to rework the content type's describer to make detection of the content type work correctly. Meanwhile, a default has been reinstated (but "ISO-8859-1" has been substituted for "UTF-8", as this is what JSP uses as its default and therefore seems more appropriate).
Comment 5 Ian Trimble CLA 2011-04-08 20:16:49 EDT
Fix submitted at 2011/04/08 05:16PM PDT.