Skip to content

QR code Generation fails depending on locale #83

Closed

Description

@bardiir

The QR code generation does fail, depending on the locale if the decimal separator is not defined as a point.

This is caused by the library generating comma separated numbers in places where a point value is expected, for example <g transform="scale(10,811)"> instead of <g transform="scale(10.811)"> on de_DE as the float is transformed with a comma as a decimal separator by the sprintf including it as a string, basically casting float to string in the process.

Imagick png is also affected by the locale, although I haven't figured out exactly why yet.

Activity

  1. DASPRiD commented on May 21, 2021

    @DASPRiD
    Member

    PR #68 tried to address this issue, but the author never followed up on the required changes. Feel free to create a new PR for that.

  2. bardiir commented on May 24, 2021

    @bardiir
    Author
  3. dictacode commented on May 26, 2022

    @dictacode

    I have the same problem, my app works fine until i change the locale settings.

  4. vlakoff commented on Mar 16, 2026

    @vlakoff
    Contributor

    It looks like #100 partially addressed the issue, a further fix was opened in PR #177 but stalled soon after, and the definitive resolution came with the move to PHP 8.0 — with #218 reverting #100 to avoid trailing zeroes.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions