[Geomoose-users] Search Capablility For A Layer with Portuguese special characters

André Barriguinha andrebarriguinha at agriciencia.com
Fri Mar 14 02:22:45 PDT 2014


Hi,

Thank you for the replies.

But the problem pressists even with encodeURIComponent()

Here are the parameters that are send when I search for "bragança"

> comparitor0 	|like-icase|
> dojo.preventCache 	|1394788474941|
> fieldname0 	|distrito|
> highlight 	|true|
> layer0 	|caop/caop|
> mode 	|search|
> template0 	|itemquery|
> value0 	|bragan%E7a|
>

The value that is sent is not ok


Regards

André
Untitled Document


Em 13-03-2014 19:00, geomoose-users-request at lists.osgeo.org escreveu:
> Send Geomoose-users mailing list submissions to
> 	geomoose-users at lists.osgeo.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.osgeo.org/mailman/listinfo/geomoose-users
> or, via email, send a message with subject or body 'help' to
> 	geomoose-users-request at lists.osgeo.org
>
> You can reach the person managing the list at
> 	geomoose-users-owner at lists.osgeo.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Geomoose-users digest..."
>
>
> Today's Topics:
>
>     1. Re: Geomoose-users Digest, Vol 33, Issue 5 (Jim Klassen)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 13 Mar 2014 12:29:08 -0500
> From: Jim Klassen <klassen.js at gmail.com>
> To: geomoose-users at lists.osgeo.org
> Subject: Re: [Geomoose-users] Geomoose-users Digest, Vol 33, Issue 5
> Message-ID: <5321EAE4.2070905 at gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> +1 on replacing escape() with encodeURIComponent() as escape() is
> deprecated and doesn't always handle Unicode correctly [1].
>
> I am not up on the PHP services, but I have to call URI.unescape() on
> the parameters in my Ruby services so calling urldecode() in PHP makes
> some sense.
>
> Any objections?
>
> [1] http://www.w3schools.com/jsref/jsref_escape.asp
>
> On 03/13/2014 12:13 PM, Micha? Chmielewski wrote:
>> Hi Andr?,
>>
>> If I understand correct you have a problem with special characters
>> I had the same problem with eastern europe languages.
>> My solution is to change coding: "escape" into "encodeURIComponent" in
>> Service.js
>> the easy part is to change lines with:
>> params[input_name].push( escape(input_value) );
>> into
>> params[input_name].push( escape(input_value) );
>> into
>> params[input_name].push( encodeURIComponent(input_value) );
>>
>> And the hard part, in every php file, all request change into urldecode
>> for example in identyfy.php
>> $visibleLayers = $_REQUEST['layers'];
>> into
>> $visibleLayers = urldecode($_REQUEST['layers']);
>> ...
>> $projection = $_REQUEST['projection'];
>> into
>> $projection = urldecode($_REQUEST['projection']);
>> ...
>> lot of fun ;)
>>
>> but this will make geomoose fit for all languages.
>>
>>
>> good lock
>> chmielix
>>
>>
>> On 13 March 2014 17:55, <geomoose-users-request at lists.osgeo.org
>> <mailto:geomoose-users-request at lists.osgeo.org>> wrote:
>>
>>      Send Geomoose-users mailing list submissions to
>>      geomoose-users at lists.osgeo.org <mailto:geomoose-users at lists.osgeo.org>
>>
>>      To subscribe or unsubscribe via the World Wide Web, visit
>>      http://lists.osgeo.org/mailman/listinfo/geomoose-users
>>      or, via email, send a message with subject or body 'help' to
>>      geomoose-users-request at lists.osgeo.org
>>      <mailto:geomoose-users-request at lists.osgeo.org>
>>
>>      You can reach the person managing the list at
>>      geomoose-users-owner at lists.osgeo.org
>>      <mailto:geomoose-users-owner at lists.osgeo.org>
>>
>>      When replying, please edit your Subject line so it is more specific
>>      than "Re: Contents of Geomoose-users digest..."
>>
>>
>>      Today's Topics:
>>
>>      1. Search Capablility For A Layer with Portuguese special
>>      characters (Andr? Barriguinha)
>>
>>
>>      ----------------------------------------------------------------------
>>
>>      Message: 1
>>      Date: Thu, 13 Mar 2014 16:55:35 +0000
>>      From: Andr? Barriguinha <andrebarriguinha at agriciencia.com
>>      <mailto:andrebarriguinha at agriciencia.com>>
>>      To: Dan Little <theduckylittle at gmail.com
>>      <mailto:theduckylittle at gmail.com>>
>>      Cc: GeoMOOSE Users List <geomoose-users at lists.osgeo.org
>>      <mailto:geomoose-users at lists.osgeo.org>>
>>      Subject: [Geomoose-users] Search Capablility For A Layer with
>>      Portuguese special characters
>>      Message-ID: <5321E307.4000509 at agriciencia.com
>>      <mailto:5321E307.4000509 at agriciencia.com>>
>>      Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>>
>>      Yes UTF-8
>>
>>      You can see the interface here although in Portuguese:
>>
>>      http://agriciencia.servehttp.com:1024/riplante/riplante.html
>>
>>      I have also the same issues in the identify tool. If i use a shapefile
>>      and read directly from the table stored in a folder it doesnt
>>      work. If i
>>      put them in PostGIS it reads ok and all the special characters are
>>      identified.
>>
>>      Regards
>>
>>      Andr?
>>      Untitled Document
>>
>>
>>      Em 13-03-2014 16:38, Dan Little escreveu:
>>      > Hi Andr?,
>>      >
>>      > This is an issue with encodings and PHP that I need to work out. I
>>      > keep forgetting to do it. We've ran into this problem with Russian,
>>      > Turkish, and German. I can probably create a test case for German.
>>      > Are you using UTF-8?
>>      >
>>      >
>>      > On Wed, Mar 12, 2014 at 1:01 PM, Andr? Barriguinha
>>      > <andrebarriguinha at agriciencia.com
>>      <mailto:andrebarriguinha at agriciencia.com>
>>      > <mailto:andrebarriguinha at agriciencia.com
>>      <mailto:andrebarriguinha at agriciencia.com>>> wrote:
>>      >
>>      > I'm having trouble setting up the search to a layer when I use
>>      > characters like ? ou ?
>>      >
>>      > Basicaly writen in Portuguese with some special characters.
>>      >
>>      > The layer is in a PostGIS database and works fine if I search
>>      > words with no special characters
>>      >
>>      > Iam using the comparitor like-icase
>>      >
>>      > Regards
>>      >
>>      > Andr? Barriguinha
>>      >
>>      >
>>      > --
>>      >
>>      > <http://www.agriciencia.com/> *Andr? Barriguinha*
>>      > */Agri-Ci?ncia, Consultores de Engenharia, Lda./*
>>      > <http://www.agriciencia.com>
>>      > Rua dos Lus?adas, 52 - 1?
>>      > 1300-372 LISBOA
>>      > PORTUGAL
>>      > *E-mail: *andrebarriguinha at agriciencia.com
>>      <mailto:andrebarriguinha at agriciencia.com>
>>      > <mailto:andrebarriguinha at agriciencia.com
>>      <mailto:andrebarriguinha at agriciencia.com>>
>>      > *Telef: *+(351) 213 649 625
>>      > *Telm:* +(351) 914 155 278 <tel:%2B%28351%29%20914%20155%20278>
>>      > *Fax:* +(351) 213 649 625 <tel:%2B%28351%29%20213%20649%20625>
>>      >
>>      >
>>      > _______________________________________________
>>      > Geomoose-users mailing list
>>      > Geomoose-users at lists.osgeo.org
>>      <mailto:Geomoose-users at lists.osgeo.org>
>>      <mailto:Geomoose-users at lists.osgeo.org
>>      <mailto:Geomoose-users at lists.osgeo.org>>
>>      > http://lists.osgeo.org/mailman/listinfo/geomoose-users
>>      >
>>      >
>>
>>      -------------- next part --------------
>>      An HTML attachment was scrubbed...
>>      URL:
>>      <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20140313/61d0b767/attachment.html>
>>      -------------- next part --------------
>>      A non-text attachment was scrubbed...
>>      Name: not available
>>      Type: image/jpeg
>>      Size: 18296 bytes
>>      Desc: not available
>>      URL:
>>      <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20140313/61d0b767/attachment.jpe>
>>
>>      ------------------------------
>>
>>      _______________________________________________
>>      Geomoose-users mailing list
>>      Geomoose-users at lists.osgeo.org <mailto:Geomoose-users at lists.osgeo.org>
>>      http://lists.osgeo.org/mailman/listinfo/geomoose-users
>>
>>      End of Geomoose-users Digest, Vol 33, Issue 5
>>      *********************************************
>>
>>
>>
>>
>> -- 
>> Micha? Chmielewski
>> mich.chmielewski at gmail.com <mailto:mich.chmielewski at gmail.com>
>>
>>
>> _______________________________________________
>> Geomoose-users mailing list
>> Geomoose-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>
>
> ------------------------------
>
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>
> End of Geomoose-users Digest, Vol 33, Issue 8
> *********************************************
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20140314/8f6f47f2/attachment-0001.html>


More information about the Geomoose-users mailing list