file name is urlEncoded ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: file name is urlEncoded ?
I'm not asking about the files but about the file paths.
Mark
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: file name is urlEncoded ?
Mark, yes, you're right that my function will not work for everything, but yours won't either. There isn't any good way to know if the special characters are intended to be part of the name or not. I'm not clear why it matters where the files come from; if they are saved to disk with special characters the script needs to deal with them.
Your method has the same issues as mine. If the file name really does contain special characters then its existence will be reported as true and your method will return false (not encoded). I'm not sure the problem is completely solveable. Checking a list of specific characters won't work either for the same reason, there's no way to know if the character was intended or part of an encoded name.
Your method has the same issues as mine. If the file name really does contain special characters then its existence will be reported as true and your method will return false (not encoded). I'm not sure the problem is completely solveable. Checking a list of specific characters won't work either for the same reason, there's no way to know if the character was intended or part of an encoded name.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: file name is urlEncoded ?
jmburnod, thinking about this more, maybe the real question is "why do you need to know?" If you are just working with files, then their name on disk is their "real" file name. Using that file name allows access to the file (read/write) and any lists the stack needs to display will be accurate representations of what is on disk. If we know why decoding is necessary, maybe there is a different way to solve it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: file name is urlEncoded ?
Hi,
Jacques,
Mark
Where come the files from ?
The files come from my iPad or zip archive in the alternatic server or the user's computer
There are urlencoded because that is a way that I found to keep the diacritical chars of a filename in a .zip archive.
Kind regards
Jean-Marc
Jacques,
Users should be able to add files that come from a server or from his owner desktop or device machine and it is possible to have urlencoded files or not.why do you need to know ?
Mark
Where come the files from ?
The files come from my iPad or zip archive in the alternatic server or the user's computer
There are urlencoded because that is a way that I found to keep the diacritical chars of a filename in a .zip archive.
Kind regards
Jean-Marc
https://alternatic.ch
Re: file name is urlEncoded ?
Hm. Would it be safe to assume that you should decode files from a remote server or device, but not from the local machine?jmburnod wrote: Users should be able to add files that come from a server or from his owner desktop or device machine and it is possible to have urlencoded files or not.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: file name is urlEncoded ?
Hi Jacque,
Yes, if there is no solution to recognize a name of file encoded but it pushes away the problem farther: a user could have a file encoded on his hard disk
Code: Select all
Would it be safe to assume that you should decode files from a remote server or device, but not from the local machine?
https://alternatic.ch
Re: file name is urlEncoded ?
True, but in that case the encoded name really is the name of the file. It will look the same in the OS (Finder or Explorer.)jmburnod wrote: Yes, if there is no solution to recognize a name of file encoded but it pushes away the problem farther: a user could have a file encoded on his hard disk
It's an interesting question. Are you on the mailing list? Some of the people there may have ideas. If you aren't, I can ask for you and let you know.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: file name is urlEncoded ?
No. Which is the procedure to appear to it ?Jacque wrote
Are you on the mailing list ?
https://alternatic.ch
Re: file name is urlEncoded ?
Hi All,
I don't know what is the best place for this post (This one or a new topic in the IOS)
It concern the same mistake but on IOS
I remain a little confused with file name urlencoded
If a file name with space is urlEncoded on IOS
urlEncode("Céline est arrivée.txt") = "C%258Eline+est+arriv%8Ee.txt"
and the file name = "C%258Eline+est+arriv%8Ee.txt"
if not
"Céline est partie.txt" = "C%258Eline est arriv%8Ee.txt"
The diacritical char is urlEncoded but not the space char
Fortunately urlDecode("C%258Eline est arriv%8Ee.txt") = "Céline est arrivée.txt"
Best regards
Jean-Marc
I don't know what is the best place for this post (This one or a new topic in the IOS)
It concern the same mistake but on IOS
I remain a little confused with file name urlencoded
If a file name with space is urlEncoded on IOS
urlEncode("Céline est arrivée.txt") = "C%258Eline+est+arriv%8Ee.txt"
and the file name = "C%258Eline+est+arriv%8Ee.txt"
if not
"Céline est partie.txt" = "C%258Eline est arriv%8Ee.txt"
The diacritical char is urlEncoded but not the space char
Fortunately urlDecode("C%258Eline est arriv%8Ee.txt") = "Céline est arrivée.txt"
Best regards
Jean-Marc
https://alternatic.ch
Re: file name is urlEncoded ?
Sorry, I just saw this. For some reason, "read new posts" didn't show me this last week. You can sign up for the mailing list here:jmburnod wrote:No. Which is the procedure to appear to it ?Jacque wrote
Are you on the mailing list ?
http://lists.runrev.com/mailman/listinfo/use-livecode/
I have had issues with iOS urlencoding too. Maybe someone on the mailing list knows more about it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: file name is urlEncoded ?
Thank Jacque. I'll do thatJacque said: You can sign up for the mailing list here:
https://alternatic.ch