Hi Patrick, On Mar 6, 2012, at 14:55 , Patrick Ohly wrote:
> Is there some utility code for decoding an URI into its individual > parts? Yes, it's called splitURL in sysync_utils.h/.cpp > Simple string operations don't work for an uri like this: > > file:///tmp/abc%25def => file:// + /tmp/abc%def splitURL in its current state cannot do that correctly either. However, I agree it would make sense to enhance it rather than creating a new function. > I've recently come across this because Evolution Data Server somehow > puts such an encoded % into PHOTO file URIs, which the engine scripts > need to inline before sending to a peer. > > I'm in the process of writing another script method which extracts the > file path and does URI decoding, but I don't want to reinvent the wheel > if there is already such code. A quick search hasn't brought up > anything, though. So far, splitURL is used only internally (rarely in libsynthesis, as its main use was in the transport layers of the old monolithic clients), and was not exposed as script function. Best Regards, Lukas Zeller, plan44.ch [email protected] - www.plan44.ch _______________________________________________ os-libsynthesis mailing list [email protected] http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
