apache / apache/netbeans

Invisible characters error

Open
#5,033 2 comments 1 reaction 0 assignees View on GitHub
kind:bug PHP
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 15

### What happened

I got an error copying this code into Netbeans:

![Capture d’écran du 2022-11-30 21-39-51](https://user-images.githubusercontent.com/10517497/204905539-ad3cab8f-5e2c-43ab-9051-c1d9dfb2a4ca.png)
![Capture d’écran du 2022-11-30 21-40-59](https://user-images.githubusercontent.com/10517497/204905535-1c264e30-21db-48d2-96f4-23b9ec3240fa.png)
![Capture d’écran du 2022-11-30 21-41-02](https://user-images.githubusercontent.com/10517497/204905622-1ff1b33d-2895-4bd2-a2f0-72addf99a7e8.png)

Opening it in Visual Studio Code, the code contains **No-Break Spaces**.

![Capture d’écran du 2022-11-30 21-59-51](https://user-images.githubusercontent.com/10517497/204906928-be6c0215-1a8a-4c11-99c0-3b63ed08db56.png)

Messages and highlighting invisible characters in Netbeans does not help to understand this error

### How to reproduce

- Go to https://www.php.net/manual/en/language.generators.syntax.php,
- Go to section **yield from with iterator_to_array()**,
- Copy the sample code to a php file in Netbeans.

Or copy the code:
```php

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by reproducing the PHP sample in the NetBeans editor using the documented no-break spaces, then inspect how the editor reports and highlights these characters. Done means the copied sample produces an understandable diagnostic or highlighting that identifies the offending characters.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.