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.
as per Tomas comments in 122412, am filing this to have the default php encoding value shown in the new php project wizard be that of utf-8, and not the encoding if the locale user is in when running nb. also, is there a reason why php new project wizard asks for encoding value; most nb projects , besides freeform I believe, do not and just use utf-8 as default, and user then can change it within project props. I'm not saying its not a helpful item, but just different than other projects. There is RFE filed to have global ide option for project encoding, since otherwise for other projects, to change the project encoding one needs to either: a. change the encoding of existing project via project props and then change encoding of all files created at time of project creation, or of project import of existing project; potentially lots of work. b. change project encoding of some other project, even if just a non used project, then create php project and it will be in that encoding; but also seems to be unneeded steps, and not clear process for doing it IMO.
to clarify, I was running in solaris ja locale for this case; same would happen when users run in windows, since there is not even a utf-8 ja locale to run in. ken.frank@sun.com
My comment from issue #122412: > UTF-8 is definitely the most widely used encoding in PHP applications IMHO. is true - but this doesn't mean that PHP project behaviour should be inconsistent with other project types. And one can find this combo in the new project wizard because if one imports some existing project, IDE is not able to reliably recognize file encoding (moreover, each file can have different encoding, why not). The default value is taken from user's system - once changed, it is remembered and next time offered as a default. This is expected behaviour, the same like in all the project types.
Tomas, I don't think default project value is taken from system for other project type - it uses utf-8 if for that session and/or user dir, no other encoding had been chosen in any project, otherwise it uses the current view of global project encoding ie if I change project encoding of some project to euc-jp, then all future projects will use that encoding, until project encoding of some project is changed again. if no project encoding ever changed, then utf-8 will continue to be used. but you mention The default value is taken from user's system - once changed, it is remembered and next time offered as a default. This is expected behaviour, the same like in all the project types. --> other project types don't provide such choices in new wizard, so don't know if its applicable here, but I think the question is, why would not the current global project encoding value be presented, rather than the encoding of the locale user is in ? That does not seem consistent with how other project types handle things. please reopen if this is valid comments. ken.frank@sun.com
> I don't think default project value is taken from system for other project type > why would not the current global project encoding value be presented, rather than the encoding of the locale user is > in ? That does not seem consistent with how other project types handle things. In fact, PHP project is using FileEncodingQuery.getDefaultEncoding() which is the same like in J2SE project. However I will try to investigate with clean userdir and new J2SE project and let you know. Thanks.
Ken, you are right - the default encoding is always UTF-8. I was wrong because I use Linux with UTF-8 as system locale - now I verified on Windows (windows-1250) that for both Java and PHP project the default encoding is UTF-8 (as I wrote, PHP project uses the same approach as J2SE project). So the behaviour is consistent for all the project types.
using recent builds, its ok - project encoding is seeded in new wizard with current proj encoding value and if change proj encoding value in php proj props, then new project, like j2se one for example, uses that encoding - as per feq. ken.frank@sun.com