[php-maint] Bug#610666: php5-imagick: drawImage error with non-english locale LC_NUMERIC

Per Eric Rosén per at rosnix.net
Thu Jan 20 23:25:40 UTC 2011


Package: php5-imagick
Version: 2.1.1RC1-1
Severity: normal
Tags: l10n


When calling $image->drawImage($draw) on a IMagick object, and the locale
LC_NUMERIC (or LC_ALL) is set to "sv_SE.UTF-8", i get this exception:

Fatal error: Uncaught exception 'ImagickException' with message 'Non-conforming drawing primitive definition `ellipse'' in /home/per/lokalt/www/test.php:14 Stack trace: #0 /home/per/lokalt/tyda/www/test.php(14): Imagick->drawimage(Object(ImagickDraw)) #1 {main} thrown in /home/per/lokalt/tyda/www/test.php on line 14

When using a british LC_NUMERIC, or "C", it works fine. 
Just a guess: something with the decimal symbol?

Script to reproduce:

<?php
// this give problems
setlocale(LC_NUMERIC,"sv_SE.UTF-8");
// thoose work fine
// setlocale(LC_NUMERIC,"en_GB.TF-8");
// setlocale(LC_NUMERIC,"C");

$image = new Imagick();
$image->newImage(500,500,new ImagickPixel('lightgray'));
$draw = new ImagickDraw();
$draw->setFillColor('wheat');
$draw->setStrokeColor( new ImagickPixel('green'));
$draw->ellipse(100,100,49,49,0,360);
$image->drawImage($draw);
$image->setImageFormat('png');
header('Content-type: image/png');
echo $image;
?>

-- System Information:
Debian Release: 5.0.7
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/1 CPU core)
Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages php5-imagick depends on:
ii  libapache2-mod- 5.2.6.dfsg.1-1+lenny9    server-side, HTML-embedded scripti
ii  libc6           2.7-18lenny7             GNU C Library: Shared libraries
ii  libmagick10     7:6.3.7.9.dfsg2-1~lenny4 image manipulation library
ii  php5-cli [phpap 5.2.6.dfsg.1-1+lenny9    command-line interpreter for the p
ii  php5-common     5.2.6.dfsg.1-1+lenny9    Common files for packages built fr
ii  ucf             3.0016                   Update Configuration File: preserv

php5-imagick recommends no packages.

php5-imagick suggests no packages.

-- no debconf information





More information about the pkg-php-maint mailing list