RES: [UMN_MAPSERVER-USERS] RES: [UMN_MAPSERVER-USERS] [PHP MapScript] Problem with ms_newShapefileObj and path with special characters

Murilo Lacerda Yoshida murilo.yoshida at AGX.COM.BR
Fri Jun 17 11:54:18 EDT 2005


  So maybe the problem is that I am escaping the parenthesis when I
create the shape ...
  I will test here, in my script, for the same shapefile name and path,
it executes
ms_newShapefileObj("/home/test/Hiro´s_Test/Teste\(blablabla:\)_\)/datat
esteShapeFile",MS_SHP_POLYGON);
  Ok, thanks a lot, I'll test here.
    Murilo

-----Mensagem original-----
De: Julien-Samuel Lacroix [mailto:jlacroix at dmsolutions.ca] 
Enviada em: sexta-feira, 17 de junho de 2005 11:49
Para: Murilo Lacerda Yoshida
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Assunto: Re: [UMN_MAPSERVER-USERS] RES: [UMN_MAPSERVER-USERS] [PHP
MapScript] Problem with ms_newShapefileObj and path with special
characters

It worked fine for me. Here what I did. Note that I also escaped the 
':'. I used 4.6 on RedHat 9.

$ cd /home/test/
$ mkdir Hiro´s_Test/
$ cd Hiro´s_Test/
$ mkdir Teste\(blablabla\:\)_\)
$ cd Teste\(blablabla\:\)_\)/
$ ls
$ pwd
/home/test/Hiro´s_Test/Teste(blablabla:)_)

### Here I ran the following script
###   dl("php_mapscript.so");
### 
ms_newShapefileObj("/home/test/Hiro´s_Test/Teste(blablabla:)_)/datatest
eShapeFile",MS_SHP_POLYGON);
###   exit;

$ ls
datatesteShapeFile.shp  datatesteShapeFile.shx

Julien

On 06/17/2005 10:36 AM, Murilo Lacerda Yoshida wrote:
>   Sorry, I forgot to put the quotes on the example .. 
>   You tested the cration with this name
> ("Hiro´s_TestTeste(blablabla:)_)datatesteShapeFile"), right?
>   Please try with this name ("testeShapeFile") in the path
> ("/home/test/Hiro´s_Test/Teste(blablabla:)_)/data"). You'll have to
> escape the parenthesis to create the path.
>   The problem I had wasn't on the shapefile name, was in the path to
it.
>   Thanks,
>      Murilo
> 
> -----Mensagem original-----
> De: Julien-Samuel Lacroix [mailto:jlacroix at dmsolutions.ca] 
> Enviada em: sexta-feira, 17 de junho de 2005 10:53
> Para: Murilo Lacerda Yoshida
> Cc: MAPSERVER-USERS at lists.umn.edu
> Assunto: Re: [UMN_MAPSERVER-USERS] [PHP MapScript] Problem with
> ms_newShapefileObj and path with special characters
> 
> Hi,
> 
> I tried to create a shapefile and it work in PHP MapScript and it
> worked.
> 
>
ms_newShapefileObj("/home/test/Hiro´s_TestTeste(blablabla:)_)datatesteS
> hapeFile",MS_SHP_POLYGON);
> 
> Note that I added the opening and closing quotes and that this path 
> (/home/test/) is an existing path where the webserver as the right to
> write.
> 
> Julien
> 
> 
> On 06/16/2005 07:18 PM, Murilo Lacerda Yoshida wrote:
> 
>>  Hi all,
>>  I tried to create a shapefile using a path with special characters
> 
> in
> 
>>a linux system, all escaped by backslashes (\).
>>  The problem is that the ms_newShapefileObj function doesn't appear
> 
> to
> 
>>work with this kind of path ... I tried to create a regular file using
>>the same path and the same name as the failed shapefile in a terminal,
>>and it worked fine.
>>  Is it a bug? Did somebody had this problem?
>>  Example:
>>
> 
>
ms_newShapefileObj(/teste/mapas/btg/Hiro´s_Test/Teste\(blablabla:\)_\)/d
> 
>>ata/testeShapeFile,MS_SHP_POLYGON);
>>
>>  Thanks in advance,
>>     Murilo
>>
>>
> 
> 

-- 
------------------------------------------------------------
Julien-Samuel Lacroix            jlacroix at dmsolutions.ca
DM Solutions Group               http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-users mailing list