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 224480 - Syntax highlighting support for unicode characters
Summary: Syntax highlighting support for unicode characters
Status: RESOLVED INVALID
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-04 12:54 UTC by lstrojny
Modified: 2013-04-08 16:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lstrojny 2013-01-04 12:54:24 UTC
This is perfectly valid PHP code: https://gist.github.com/4446297

Nevertheless, PHPStorm does neither highlight nor auto complete it correctly.
Comment 1 lstrojny 2013-01-04 12:58:01 UTC
Sorry, I wanted to obviously say NetBeans, not PhpStorm.
Comment 2 Ondrej Brejla 2013-01-04 13:26:15 UTC
Not sure, in unicode, there are two "tripple-dots". u+0085 and u+2026. The second one shouldn't work, it's out of u+007f and u+00ff range (which is supported by PHP specification). Can you confirm that the "right" character is used? Afaik PHPStorm supports almost all unicode chars, not just that which are supported by PHP specification (which is wrong, even if PHP in runtime "works" with such characters properly). We try to follow specification as it's possible.
Comment 3 lstrojny 2013-01-04 13:37:19 UTC
It’s u+2026 and PHP executes it.
Comment 4 Ondrej Brejla 2013-01-04 13:41:45 UTC
So that's the case I described. PHP supports (by its specification) unicode chars from range 007f-00ff. This is out of range, so no-one should use it (it's not allowed anywhere so it can stop working in runtime in every minor PHP update!, without any mention in their change log!). We will not support it. Sorry. It's a buggy behavior and everyone who uses it rapes PHP runtime.
Comment 5 midnightlightning 2013-04-08 16:23:54 UTC
I just ran across this symptom in another file that uses multibyte characters (Twig has a "Snowman" character as part of their Unit Tests: https://github.com/fabpot/Twig/blob/master/test/Twig/Tests/IntegrationTest.php#L160).

I can understand the rationale for giving some sort of notice on using a multibyte character in a function/variable name, but can it be a "Warning" or a "Notice" level alert and not an "Error"?

In Netbeans 7.3, that Twig file shows a red highlight on line 160 over the function name, and an Error on line 165 (detected another instance of "function" before a valid identifier of the prior "function"). Can you register that a multibyte character is a valid identifier, but flag it as a notice instead?