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.
from email with Andrei >for nb6 there is the new project encoding property and certain >> changes on how certain files handle encoding and how certain >> files (jsp/html/xml) are seeded with encoding or charset value. >> >> please ignore this question if things mentioned below has been done or not >> needed to be done: >> >> Does the db query or other functionality need to query for and use the >> project or global encoding property ? or other parts of db >> functionality ? >> (I realize user does not need to be in project to use db) >> >> (( that is, in prev release, the encoding of the locale the user is in >> was used as the encoding to use, but thats not the case now) >> >> also, soa allows sql project with .sql file created - I don't know if this >> filetype needs have its own file encoding or if can use that of project >> or global. If there is a way for the user to create a SQL file, we should probably support encodings correctly. Currently the SQL editor only supports UTF-8 with BOM and the default locale encoding. Could you please file an issue for it?
Done, will commit tomorrow.
what's the "rule" on this - since I think .sql might not be related to a given project sometimes, does it use the global encoding value for its view of encoding or that of locale user is in ? or if part of like soa sql project, does it use encoding of that project ? (I want to understand some scenarios for testing this) ken.frank@sun.com
Frankly, I don't know, I'll check tomorrow. What I did was: - make sure that SQL files in projects use the project encoding - make sure that the "console" SQL files (e.g. from View Data in the DB Explorer) use UTF-8 (this is the current state, I just reimplemented it using FileEncodingQuery) I guess SQL files not owned by a project should use the same encoding other files do. I didn't do anything special there.
The charset for SQL files not owned by a project is the default charset, which is based on the default locale.
Fixed. Checking in core/nbproject/project.xml; /cvs/db/core/nbproject/project.xml,v <-- project.xml new revision: 1.8; previous revision: 1.7 done Checking in core/src/org/netbeans/modules/db/sql/loader/SQLDataObject.java; /cvs/db/core/src/org/netbeans/modules/db/sql/loader/SQLDataObject.java,v <-- SQLDataObject.java new revision: 1.5; previous revision: 1.4 done Checking in core/src/org/netbeans/modules/db/sql/loader/SQLEditorSupport.java; /cvs/db/core/src/org/netbeans/modules/db/sql/loader/SQLEditorSupport.java,v <-- SQLEditorSupport.java new revision: 1.19; previous revision: 1.18 done Checking in sqleditor/src/org/netbeans/modules/db/sql/editor/SQLEditorProviderImpl.java; /cvs/db/sqleditor/src/org/netbeans/modules/db/sql/editor/SQLEditorProviderImpl.java,v <-- SQLEditorProviderImpl.java new revision: 1.8; previous revision: 1.7 done
verified: sql files shows mbyte ok. Checked with utf-8/win-31j project encoding