Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Some characters are stripped from documentation

Open
#254 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
php
Domain
documentation

Research direction

Read the example in src/wp-includes/utf8.php and compare it with the rendered wp_is_valid_utf8() documentation. Trace how the PHP example is parsed, focusing on the missing \x and ✏ characters. Done means the documented example preserves both differences shown in the issue.

Written by the indexing model from the issue text.

Description

For example, wp_is_valid_utf8() includes this example text:

true === wp_is_valid_utf8( '' );
true === wp_is_valid_utf8( 'just a test' );
true === wp_is_valid_utf8( "\xE2\x9C\x8F" );    // Pencil, U+270F.
true === wp_is_valid_utf8( "\u{270F}" );        // Pencil, U+270F.
true === wp_is_valid_utf8( '' );              // Pencil, U+270F.

false === wp_is_valid_utf8( "just xC0 test" ); // Invalid bytes.
false === wp_is_valid_utf8( "\xE2\x9C" );       // Invalid/incomplete sequences.
false === wp_is_valid_utf8( "\xC1\xBF" );       // Overlong sequences.
false === wp_is_valid_utf8( "\xED\xB0\x80" );   // Surrogate halves.
false === wp_is_valid_utf8( "B\xFCch" );        // ISO-8859-1 high-bytes.
                                                // E.g. The “ü” in ISO-8859-1 is a single byte 0xFC,
                                                // but in UTF-8 is the two-byte sequence 0xC3 0xBC.

However, the documented example is this:

true === wp_is_valid_utf8( '' );
true === wp_is_valid_utf8( 'just a test' );
true === wp_is_valid_utf8( "\xE2\x9C\x8F" );    // Pencil, U+270F.
true === wp_is_valid_utf8( "\u{270F}" );        // Pencil, U+270F.
true === wp_is_valid_utf8( '✏' );              // Pencil, U+270F.

false === wp_is_valid_utf8( "just \xC0 test" ); // Invalid bytes.
false === wp_is_valid_utf8( "\xE2\x9C" );       // Invalid/incomplete sequences.
false === wp_is_valid_utf8( "\xC1\xBF" );       // Overlong sequences.
false === wp_is_valid_utf8( "\xED\xB0\x80" );   // Surrogate halves.
false === wp_is_valid_utf8( "B\xFCch" );        // ISO-8859-1 high-bytes.
                                                // E.g. The “ü” in ISO-8859-1 is a single byte 0xFC,
                                                // but in UTF-8 is the two-byte sequence 0xC3 0xBC.

Differences:

  • just \xC0 test becomes just xC0 test
  • is removed
Dominant language
PHP
Stars
239
Forks
81
Avg merge
16h 29m
Merged PRs (30d)
8

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WordPress/phpdoc-parser

All issues in WordPress/phpdoc-parser

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.