Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 107911 - I18N - encoding of created xml files needs to be based on project encoding
I18N - encoding of created xml files needs to be based on project encoding
Status: RESOLVED DUPLICATE of bug 97872
Product: xml
Classification: Unclassified
Component: Code
All All
: P2 (vote)
: 6.x
Assigned To: Samaresh Panda
: I18N
Depends on:
  Show dependency treegraph
Reported: 2007-06-23 01:36 UTC by Ken Frank
Modified: 2007-09-25 01:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2007-06-23 01:36:06 UTC
now there is new project and file encoding implementation and issue 97872 is filed about it.

Related to this is that currently,
new jsp files  are seeded with utf-8 encoding tag when the files are created.

however, feq implemenation is for encoding of new projects are seeded with current value of global encoding
or use utf-8 by default.

from mail discussions with Tomas, the xml file needs to get its encoding from the project
encoding value, and also its better to place that encoding in the charset notation
of the xml file.

(similar issues are filed on html and jsp files)

(information from Tomas is that the encoding of the html or jsp or xml
file is the one used in the editor and other non runtime operations
of these files - besides being for the runtime information.)
Comment 1 Ken Frank 2007-06-23 01:37:26 UTC
also, the other parts of the project need to use the project encoding in their interaction
with the xml file as to non runtime aspects like in the editor, etc.
Comment 2 Ken Frank 2007-07-01 19:17:09 UTC
I think this would apply to all xml files that are created by or for user that are 
listed in the template manager ? 

 or should some stay using the utf-8 that is hardcoded now ?
(perhaps there are others also ?)

I don't know if this issue should be done until 97872 related to project encoding handling would be done ?
Comment 3 Ken Frank 2007-08-14 16:15:51 UTC
now this has been done for jsp and html files; and developer in other area was asking about this
one and 97872 related to issues in their areas (that is, they need to fix some encoding problems
but approach might be different once these are implemented.
Comment 4 Nikita Krjukov 2007-08-16 13:05:47 UTC
I'm not sure it worth to allow to a user creating an XML with 
non-standard encoding other then UTF-8. The user can accidently
specify a non UTF-8 encoding for the project and forget about it. 
He can note too late that all his XML files are created in a 
non-standard encoding.

But if Ken is insisting on it, then I suppose the encoding 
can be specified here: 

package org.netbeans.modules.xml.core;
class XMLDataLoader
method: createFromTemplate
   BufferedWriter w = new BufferedWriter (new OutputStreamWriter (fo.getOutputStream (lock), "UTF8")); // NOI18N

Also the encoding value has to be parametrized in all XML templates. 
I hope we have not so much of them now.
Comment 5 Samaresh Panda 2007-08-16 23:42:35 UTC
Point taken, we need to have FEQ, but we don't have to have several issues for the same thing.

*** This issue has been marked as a duplicate of 97872 ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo