FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-3022: Explictly specify byte order by dantleech · Pull Request #3033 · phpactor/phpactor · GitHub

gh-3022: Explictly specify byte order - #3033

Merged
dantleech merged 2 commits into
masterfrom
gh-3022-byte-order
Mar 21, 2026
Merged

gh-3022: Explictly specify byte order#3033
dantleech merged 2 commits into
masterfrom
gh-3022-byte-order

Conversation

dantleech commented Mar 20, 2026
edited
Loading

Copy link
Copy Markdown
Collaborator

If ext-mbstring is not installed, then
polyfll-mbstring will take over. The polyfill uses iconv.

There is an off-by-one issue that happens when the ext-mbstring is not enabled.

mbstring outputs UTF-16BE (first in screenshot) and iconv outputs UTF-16LE and also adds BOM (fffe).

By explicitly specifying the byte order we remove the ambiguity.

thanks @zobo for finding this. fixes #3022

If ext-mbstring is not installed, then
https://github.com/symfony/polyfill-mbstring will take over. The
polyfill uses `iconv`

There is an off-by-one issue that happens when the ext-mbstring is not
enabled.

`mbstring` outputs UTF-16BE (first in screenshot) and `iconv` outputs UTF-16LE and also adds BOM (fffe).

By explicitly specifying the byte order we remove the ambiguity.

github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Phpactor Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.30.

Benchmark suite Current: 1e7aa03 Previous: d4c868b Ratio
ClassMemberCompletorBench::benchComplete 162825.9 μs (± 1.12%) 10590.8 μs (± 3.36%) 15.37
WorseLocalVariableCompletorBench::benchComplete 22067.6 μs (± 0.93%) 2363.7 μs (± 2.17%) 9.34
LexerBench::benchLex 1350 μs (± 0%) 615 μs (± 0%) 2.20
DiagnosticsBench::benchDiagnostics 809022.6 μs (± 0.47%) 71287.2 μs (± 0.79%) 11.35

This comment was automatically generated by workflow using github-action-benchmark.

dantleech merged commit cb25ad2 into master Mar 21, 2026
13 checks passed
dantleech deleted the gh-3022-byte-order branch March 21, 2026 21:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If ext-mbstring is missing hover positions are wrong

1 participant


Back | FazBrowse Home | New Git URL