When passing a string to HtmlBuilder::limit that includes umlauts, the string encoding somehow gets messed up. The following test case fails: https://github.com/OFFLINE-GmbH/library/commit/dbaff8e164f5b081e03b72e1e12c4b9f4c72cb36
public function testLimitEncoding()
{
$result = with(new HtmlBuilder)->limit('<p>Er h枚rte leise Schritte hinter sich. Das bedeutete nichts Gutes.</p>', 10);
$this->assertEquals('<p>Er h枚rte l...</p>', $result);
}
Expected output is
<p>Er h枚rte l...</p>
Received output is
<p>Er h枚锟絫e l...</p>
If this is still an issue, please log it in the main October repo. Also consider submitting a Pull Request to fix it, most of our multi lingual features stem from the community.
@tobias-kuendig did this ever get fixed?
It did not! I might find some time next week and see if I can still reproduce this issue and implement a fix.
It looks like this issue is no longer present. The test passes now without any changes. Let me know if you want a PR with the test:
https://github.com/OFFLINE-GmbH/library/commit/9fb0730579a2df0629cb6d3fe803466eb0d0311e
@tobias-kuendig sure, can't hurt
Most helpful comment
It looks like this issue is no longer present. The test passes now without any changes. Let me know if you want a PR with the test:
https://github.com/OFFLINE-GmbH/library/commit/9fb0730579a2df0629cb6d3fe803466eb0d0311e