Print

Print


Steve (and everyone!),

Last night I downloaded swis2.zip from[1]:

  http://www.signbank.org/swis2.zip

and installed it on my local apache server.  I then try to retrieve
an svg image:

  $ curl -o incorrect.svg http://localhost/swis2/glyphogram.php?style=svg&ksw=M23x20S187205xn21S20e00n8xn9S26a02n23xn16S15a36n14x8

The svg file I retrieve from this link is different from the one I
can retrieve from the swis2 server on SignPuddle.  Mine looks like
this:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="46" height="41">
<metadata>M23x20S187205xn21S20e00n8xn9S26a02n23xn16S15a36n14x8</metadata>
<g transform="translate(28,0)" ></g>
<g transform="translate(15,12)" ></g>
<g transform="translate(0,5)" ></g>
<g transform="translate(9,29)" ></g>
</svg>

Where if you inspect the same ksw code from SignPuddle:

  $ curl -o correct.svg http://signbank.org/signpuddle1.6/glyphogram.php?style=svg&ksw=M45x44S2ff00n18xn17S20500n6xn5S11a1119x5S20e006x20S26a02n21x17

It looks like this:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="66" height="61">
<metadata>M45x44S2ff00n18xn17S20500n6xn5S11a1119x5S20e006x20S26a02n21x17</metadata>
<g transform="translate(3,0)" ><g transform="scale(1.029 1)">
  <path id="path2835" d="M 17.5 0 C 7.8350169 4.7369516e-15 1.087327e-16 7.8350169 0 17.5 C 0 27.164983 7.8350169 35 17.5 35 C 27.164983 35 35 27.164983 35 17.5 C 35 7.8350169 27.164983 -3.443981e-15 17.5 0 z M 17.5 2 C 26.060414 2 33 8.9395864 33 17.5 C 33 26.060414 26.060414 33 17.5 33 C 8.9395864 33 2 26.060414 2 17.5 C 2 8.9395864 8.9395864 2 17.5 2 z " fill="#000000" />
</g></g>
<g transform="translate(15,12)" ><g>
  <path id="path2828" d="M 4 0 L 4 3.59375 L 1.8125 1.40625 L 0.40625 2.8125 L 3.09375 5.5 L 0.40625 8.1875 L 1.8125 9.59375 L 4 7.40625 L 4 11 L 6 11 L 6 7.40625 L 8.1875 9.59375 L 9.59375 8.1875 L 6.90625 5.5 L 9.59375 2.8125 L 8.1875 1.40625 L 6 3.59375 L 6 0 L 4 0 z " fill="#000000" />
</g></g>
<g transform="translate(40,22)" ><g transform="scale(0.951 0.964) translate(-4.667 6.667) rotate(315)">
  <rect id="base" x="0" y="15" width="15" height="15" fill="#000000" />
  <rect id="fill" x="2" y="17" width="6" height="11" fill="#ffffff" />
  <path id="index" d="M 3.4065,3.40625 L 15.00025,15 L 12.18775,15 L 1.969,4.8125 L 3.4065,3.40625 z" fill="#000000" />
  <rect id="middle" x="7" y="0" width="2" height="15" fill="#000000" />
</g></g>
<g transform="translate(27,37)" ><g>
  <path id="path3379" d="M 6 0 C 2.6862915 0 0 2.6862915 0 6 C 0 9.3137085 2.6862915 12 6 12 C 9.3137085 12 12 9.3137085 12 6 C 12 2.6862915 9.3137085 -1.7763568e-15 6 0 z M 6 2 C 8.209139 2 10 3.790861 10 6 C 10 8.209139 8.209139 10 6 10 C 3.790861 10 2 8.209139 2 6 C 2 3.790861 3.790861 2 6 2 z " fill="#000000" />
  <path id="path3384" d="M 6 2 C 3.790861 2 2 3.790861 2 6 C 2 8.209139 3.790861 10 6 10 C 8.209139 10 10 8.209139 10 6 C 10 3.790861 8.209139 2 6 2 z M 6 4 C 7.1045695 4 8 4.8954305 8 6 C 8 7.1045695 7.1045695 8 6 8 C 4.8954305 8 4 7.1045695 4 6 C 4 4.8954305 4.8954305 4 6 4 z " fill="#ffffff" />
  <path id="path3391" d="M 6 4 C 4.8954305 4 4 4.8954305 4 6 C 4 7.1045695 4.8954305 8 6 8 C 7.1045695 8 8 7.1045695 8 6 C 8 4.8954305 7.1045695 4 6 4 z " fill="#000000" />
</g></g>
<g transform="translate(0,34)" ><g transform="scale(0.0416666666667,0.0416666666667)">
<g transform="translate(0,648) scale(2.400000,-2.400000)">
  <path fill="#000000" d="M30 236 l-34 -36 32 -32 32 -32 -32 -33 -32 -33 37 -38 37 -37 0 33
c0 30 2 32 35 32 19 0 35 5 35 10 0 6 -16 10 -35 10 l-35 0 0 55 0 55 35 0
c19 0 35 5 35 10 0 6 -15 10 -34 10 -31 0 -35 3 -38 31 l-3 30 -35 -35z"/>
</g>
</g></g>
</svg>

Inspecting my error log, the swis2 request to my local installation
generates the following error messages:

[Thu Sep  1 06:23:12 2011] [error] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos</a>]: Offset not contained in string in /var/www/localhost/htdocs/swis2/image.php on line 112
[Thu Sep  1 06:23:12 2011] [error] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos</a>]: Offset not contained in string in /var/www/localhost/htdocs/swis2/image.php on line 112
[Thu Sep  1 06:23:12 2011] [error] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos</a>]: Offset not contained in string in /var/www/localhost/htdocs/swis2/image.php on line 112
[Thu Sep  1 06:23:12 2011] [error] PHP Warning:  strpos() [<a href='function.strpos'>function.strpos</a>]: Offset not contained in string in /var/www/localhost/htdocs/swis2/image.php on line 112

Will you help me get a local swis2 installation properly generating
svg glyphograms?

Here are my machine details:

OpenBSD 4.8:

$ httpd -v
Server version: Apache/1.3.29 (Unix)

$ php -v
PHP 5.2.13 with Suhosin-Patch 0.9.7 (cli) (built: Aug 10 2010 03:44:00) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with Suhosin v0.9.29, Copyright (c) 2007, by SektionEins GmbH

$ convert -version
Version: ImageMagick 6.4.5 2010-08-09 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

-Alan

1: I think that path is correct, anyway
-- 
.i ma'a lo bradi cu penmi gi'e du