MB_CASE_TITLE treats entities as words (in contrast to uc_words)
未关闭
还没有人认领这个 Issue。
Bug
Extension: mbstring
Status: Needs Triage
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.1k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
The following code:
<?php
$txt = 'acme & co';
echo mb_convert_case($txt, MB_CASE_TITLE, 'UTF-8'), PHP_EOL;
Resulted in this output:
Acme &Amp; Co
But I expected this output instead:
Acme & Co
Using uc_words produces the expected result:
<?php
$txt = 'acme & co';
echo ucwords($txt), PHP_EOL;
results in
Acme & Co
PHP Version
PHP 8.4.5, PHP 8.2.26
Operating System
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 mb_convert_case 入口开始,使用提供的 acme & co 示例重现报告的 PHP 8.4.5 和 8.2.26 行为。当标题大小写转换保留实体为 &,同时仍生成 Acme 和 Co,并为报告的输入提供回归覆盖时,工作即完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- php
- 领域
- internationalization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 50/100