Bug 465200

Summary: Kcalc omits first 0 in Binary mode
Product: [Applications] kcalc Reporter: guimarcalsilva
Component: generalAssignee: Gabriel Barrantes <gabriel.barrantes.dev>
Status: RESOLVED DUPLICATE    
Severity: normal CC: fernandobarra2207, gabriel.barrantes.dev
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=375681
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description guimarcalsilva 2023-02-02 23:17:41 UTC
SUMMARY

This could be related to bug 375681 but I'm not sure, so I'm making a new bug report. Please close as a duplicate if it's the same issue.

If you select the Numeral System Mode and then select Bin for binary, and try to input a number that starts with 0, such as 0110, Kcalc will omit the first zero and will only show 110. That behavior is confusing. Other calculators, such as GNOME Calculator show the full value.

STEPS TO REPRODUCE
1. Select Numeral System Mode in the Settings menu
2. Select Bin under the OSD
3. Type 0110

OBSERVED RESULT
Typing 0110 only shows 110 in the OSD.

EXPECTED RESULT
Operations in the binary format should display the first zero.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 5.15.0-58-generic (64-bit)
Graphics Platform: Wayland
Processors: 6 × Intel® Core™ i5-9400F CPU @ 2.90GHz
Memory: 15,6 GiB of RAM
Graphics Processor: AMD Radeon RX 570 Series
Comment 1 Gabriel Barrantes 2024-07-05 16:16:52 UTC
Can you check in the latest version if it persists? I think you are using a version that still doesn't have the input display.
Anyway, entering something like 0110 will be interpreted as an octal number. Would be covered by 487837.

*** This bug has been marked as a duplicate of bug 487837 ***