Last modified: 2011-01-09 13:01:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T19961, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17961 - add comment to generateSitemap.php saying what is encoded
add comment to generateSitemap.php saying what is encoded
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
All All
: Normal trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: documentation
  Show dependency treegraph
Reported: 2009-03-13 02:56 UTC by Dan Jacobson
Modified: 2011-01-09 13:01 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Dan Jacobson 2009-03-13 02:56:29 UTC
In generateSitemap.php kindly add a comment explaining what

  $title = Title::makeTitle( $namespace, str_repeat( "\xf0\xa8\xae\x81", 63 ) . "\xe5\x96\x83" );

is all about.
Say what is encoded in the string. Or what encoding it is.
Comment 1 Ilmari Karonen 2011-01-06 22:45:10 UTC
It seems to be constructing a title consisting of 255 bytes, each of which needs to be URL-encoded: that should be about as long as a URL for a page in the given namespace can get.

The title is valid UTF-8, and consists of 63 repeats of the 4-byte character 
Comment 2 Ilmari Karonen 2011-01-06 22:51:18 UTC
WTF... Bugzilla truncated my comment when I tried to include the 4-byte Unicode character in it.  Trying again with the actual characters removed:

The title is valid UTF-8, and consists of 63 repeats of the 4-byte character U+28B81 followed by the 3-byte character U+5583.  My browser can't display the first character, but Googling for it led me to [[Prince of Tang (Shaowu)]] where it is used in the subject's personal name and discussed in a footnote.  The second character apparently means "keep talking, chattering; mumble" according to

Ps. Explanatory comment added in r79769.
Comment 3 Dan Jacobson 2011-01-09 13:01:04 UTC
OK, so they are just using some fun arbitrary characters maybe.
Perhaps add a note somewhere saying how such strings will be used. It's not too clear from the code.

Note You need to log in before you can comment on or make changes to this bug.