[FX.php List] Spaces in Field Names...one more time with gusto

Gjermund Gusland Thorsen ggt667 at gmail.com
Tue Dec 9 10:45:49 MST 2008


http://www.blooberry.com/indexdot/html/topics/urlencoding.htm

Significant sequences of spaces may be lost in some uses (especially
multiple spaces)

ggt

2008/12/9 Gjermund Gusland Thorsen <ggt667 at gmail.com>:
> dec       oct       hex       bin
> 032      040    020   00100000       SP    (Space)
>
> ggt667
>
> 2008/12/9 Gjermund Gusland Thorsen <ggt667 at gmail.com>:
>> &20 is ascii value of the space character
>> + is urlencoding of the space character
>>
>> ggt
>>
>> 2008/12/9 Jonathan Schwartz <jschwartz at exit445.com>:
>>> Hi Folks,
>>>
>>> I still haven't 100% licked the spaces-in-field-names issue yet.  Now I
>>> realize why, and I'm just looking for a sanity check.
>>>
>>> It appears that spaces in file names produces different behavior depending
>>> whether the FMP query is a FIND parameter versus a SORT parameter.
>>>
>>> It boils down to this:
>>>
>>> FMP Field Definition:           Alpha Beta
>>> Alpha Beta Field Value: John Smith
>>> Browser POST:           Alpha_Beta (Apache Server replaces space with
>>> underline)
>>> FMP FIND URL:           Alpha+Beta (FX (?) replaces space with "+" in URL)
>>> FMP SORT FIELD URL:     Alpha%20Beta  (FX (?) replaces space with "%20" in
>>> URL)
>>>
>>> Here's an actual URL that shows the existence of both methods in the same
>>> URL:
>>>
>>> http://Admin:Admin@000.000.000.000:80/fmi/xml/FMPXMLRESULT.xml?-db=DB.fp7&-lay=web&-max=50&-sortfield.1=Alpha%20Beta&-sortorder.1=ascend&Alpha+Beta=John+Smith&-find
>>>
>>> So...
>>> The html form displays the field name with the space.
>>> Apache POST  replaces the space with an underline.
>>> FX/PHP replaces the space in a FIELD NAMEwith a "+"
>>> FX/PHP replaces the space in a SORT NAMEwith a "%20"
>>>
>>>
>>> Argh.
>>>
>>>
>>> If this is correct, then a single remedy won't work.  A different remedy has
>>> to be applied to SEARCH fields versus SORT fields.
>>>
>>> I did get suggestions last time I posted this problem, but each time I
>>> applied the remedy, it broke the other half. Now I see why.
>>>
>>> Before I move forward....any comments?
>>>
>>> J
>>>
>>>
>>>
>>> --
>>> Jonathan Schwartz
>>> Exit 445 Group
>>> jonathan at exit445.com
>>> http://www.exit445.com
>>> 415-370-5011
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>
>>
>


More information about the FX.php_List mailing list