Make EPS & SVG Rendering usable on international locales#84
Make EPS & SVG Rendering usable on international locales#84bardiir wants to merge 1 commit intoBacon:masterfrom
Conversation
|
Generally looks fine, though two things about this:
As Considering the last PR, it should actually be fine to combine |
|
Please merge this. On a French production server, scale gets rendered as 2,572 instead of 2.572 which in turn causes a very big scaling problem. We're currently resorting to a STR_REPLACE around the generate function and is not really ideal. |
|
Ran into the same issue, setting the locale settings now around the QR-generation. Not ideal, but does the job. Without any str_replace or changes to the classes. Would it make sense to have this done in writeString()? I might be missing something... but it seems to work for me just fine. |
|
This has been addressed by #100. |
Funnily enough - This does not fix the Imagick rendering as even the base PHP function of ImagickDraw::scale(float, float) does fail on international locale with floats. But it does take care of localized numeric transformations giving broken SVGs when using the library, it's at least usable with the svg and eps backends without giving spontaneous errors.
I also opened an issue there: Imagick/imagick#404
The error you're seeing when using Imagick Backend on an international locale is going to be 'non-conforming drawing primitive definition `'
I'm probably still going to use an en_US locale now and do numeric transformations manually instead of via PHP instead. But it's anyway a good idea to support other locales, so this is at least an improvement over the original.