Skip to content

Instantly share code, notes, and snippets.

@cmb69

cmb69/34670.php Secret

Created May 3, 2021 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmb69/0355b94c13631b7b1a64df21388039d5 to your computer and use it in GitHub Desktop.
Save cmb69/0355b94c13631b7b1a64df21388039d5 to your computer and use it in GitHub Desktop.
PHP bug #34670
<?php
$im = imagecreatetruecolor(50, 30);
imagefilledrectangle($im, 0, 0, 49, 29, 0xffffff);
imagettftext($im, 24, 0, 25, 25, 0x000000, "Arial", "ä");
imagepng($im, __DIR__ . "/34670exp.png");
$im = imagecreatetruecolor(50, 30);
imagefilledrectangle($im, 0, 0, 49, 29, 0xffffff);
imagettftext($im, 24, 0, 25, 25, 0x000000, "Arial", "a\xCC\x88");
imagepng($im, __DIR__ . "/34670act.png");
@cmb69
Copy link
Author

cmb69 commented May 3, 2021

Expected:
34670exp

Actual:
34670act

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment