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.

Bug 212354

Summary: UTF-8 characters problem in php files under Included Path
Product: php Reporter: tvaroha
Component: ProjectAssignee: Tomas Mysik <tmysik>
Status: RESOLVED DUPLICATE    
Severity: normal CC: obrejla, tmysik
Priority: P3 Keywords: I18N
Version: 7.1.1   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description tvaroha 2012-05-11 07:00:19 UTC
If a project created from existing source is in UTF-8,  then other php files under Included Path are not parsed correctly and there is a problem with UTF-8 characters not showing properly in editor (Czech language). If the same file is moved into project directory it's parsed ok.

Product Version = NetBeans IDE 7.1.1 (Build 201203012225)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.6.0_31
Runtime = Java HotSpot(TM) Client VM 20.6-b01
Comment 1 Ondrej Brejla 2012-05-11 12:40:33 UTC
Tomasi, is that possible? What do you think? I'm not sure if PHP editor somehow handles PHP files encoding...

Maybe it could be the case, when sources on Include Path are out of the some PHP project, so we don't know their encoding, so default platform encoding is used. But I think that we can't do anything with that.

You can try to run NetBeans with:

-J-Dfile.encoding=UTF-8

option.
Comment 2 Tomas Mysik 2012-05-11 12:50:50 UTC
Taking over.
Comment 3 Tomas Mysik 2012-05-11 12:53:51 UTC
The "problem" here is that Include Path has the default encoding (taken from OS, so Windows-1250 in your case). It cannot have the same encoding as a project since Include Path is common for all PHP projects (and these can have different encoding, of course).

Have a look at issue #204291 for possible work around.

Thanks for reporting.

*** This bug has been marked as a duplicate of bug 204291 ***