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.
Summary: | I18N - new php project wizard seeds encoding not with utf-8 | ||
---|---|---|---|
Product: | php | Reporter: | Ken Frank <kfrank> |
Component: | Project | Assignee: | Tomas Mysik <tmysik> |
Status: | RESOLVED INVALID | ||
Severity: | blocker | Keywords: | I18N |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | Sun | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Ken Frank
2008-07-09 19:57:01 UTC
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 |