4

I am linking from QGIS to a FileMaker Pro record using links in HTML map tips. I can call the custom url scheme fmp:// with an IP address without issue, but as soon as I include the dollar sign ($) in the URL, the link no longer works.

I've tried encoding the symbol to %24 and concatenating strings but they don't work. I've also tried $ as suggested here, and variations of \$, \u0024 and \%24 with and without leading single and double backslashes.

Examples given by FileMaker:

fmp://$/Clients.fmp12?script=ListClients
fmp://192.168.10.0/Clients.fmp12?script=ListClients

The $ is significant, as it calls the currently open database, rather than trying to reopen the file, and removes the need to hardcode an IP address.

Update

I've double checked that $ is a valid symbol to include in a URL as mentioned here. I also managed to get a log output when calling the url: invalid escape sequence \$

qt seems to offer a range of options for encoding urls and strings, with reserved, unicode and byte codes for characters. I'm not sure which QGIS is using internally.

Even typing backslash escapes as a string in the expressions editor turns $ into the ? symbol.

  • 2
    this source suggests using $ instead of $. – csk May 15 at 18:56
  • @csk that doesn't work for me. I've also tried variations of \$, \u0024 and \%24 with and without leading single and double backslashes. – Sorbus May 16 at 2:36
  • 2
    You've tried everything I could think of. I edited your question to include all the different things you've tried, and added some additional tags. Hopefully that will bring it to the notice of someone with relevant knowledge. If you don't get any help here, try asking on StackOverflow, or see if there's another SE community that might know more about the FileMaker format. – csk May 16 at 15:32
0

Take a look at RFC 3986. It's heavy reading, but it should be the definitive source on whether or not the URL is valid.

According to that $ doesn't need to be escaped / urlencoded. But I'm not sure whether it's valid as part of a path (e.g. /$/)

The question that @csk linked to covers the special case of using $ in shell scripts. In this case, dollar signs DO need to be escaped. For example, if you call curl or wget from the command line.

You say the '$' reuses an existing connection. HTTP is stateless. It has no "memory" of previous requests, unless you maintain some sort of session. Each request is independent of every previous request. I suspect that your fmp urls are being treated in the same way - I doubt QGIS is maintaining a session here. Other software might do this, though.

You could try to raise this as a QGIS issue, or ask on the QGIS Developer mailing list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.