Bug #80806 [NEW]: printf does not properly align columns when extended ascii characters like µ

From: Date: Sat, 27 Feb 2021 03:42:35 +0000
Subject: Bug #80806 [NEW]: printf does not properly align columns when extended ascii characters like µ
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232409@lists.php.net to get a copy of this message
From: smcbride at msn dot com Operating system: OpenSuse Tumbleweed PHP version: 7.4.15 Package: Unknown/Other Function Bug Type: Bug Bug description:printf does not properly align columns when extended ascii characters like µ Description: ------------ When using a character like µ, printf is off by 1 character in length. It is shorter that 15s. printf("%-50s %15s %15s %15s %15s %15s" . PHP_EOL, "Function", "Num Calls", "Avg Time (µs)", "Sum Time (µs)", "Min Time (µs)", "Max Time (µs)"); Test script: --------------- printf("%-50s %15s %15s %15s %15s %15s" . PHP_EOL, "Function", "Num Calls", "Avg Time (µs)", "Sum Time (µs)", "Min Time (µs)", "Max Time (µs)"); Expected result: ---------------- Expect it to be the correct spacing -- Edit bug report at https://bugs.php.net/bug.php?id=80806&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80806&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80806&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80806&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80806&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80806&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80806&r=support Expected behavior: https://bugs.php.net/fix.php?id=80806&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80806&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80806&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80806&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80806&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80806&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80806&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80806&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80806&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80806&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80806&r=mysqlcfg

« previous php.bugs (#232409) next »