Page 1 of 1

Supporting Slovene characters

Posted: Tue Jun 04, 2013 12:24 pm
by doobox
Hi there,

I am guessing that Slovene characters are not the only ones that could create the issue i see, but there are the ones that have highlighted this issue.

Specifically i am testing with the chars (čšž)

My app gets the full path to a file the user drags in to a drop zone, ie : myFolder/myImage.jpg

LC is resolving this correctly even with chars like german, ie :

myFolder/myImageäöü.jpg

But with these Slovene chars in the filename myFolder/myImagečšž.jpg

LC resolves the path like this and it of course fails :

myFolder/myImagec s z.jpg // those spaces are filled with the acute instead of being over the letter

Re: Supporting Slovene characters

Posted: Fri Jun 07, 2013 9:44 am
by Mark
Hi,

LiveCode can't work with UTF8 encoded file paths. I just happened to have a little conversation about it here the other day. It could be solved, but it is a lot of work.

Kind regards,

Mark

Re: Supporting Slovene characters

Posted: Fri Jun 07, 2013 10:10 am
by doobox
Thanks Mark,

This sounds feasible :

It would be possible to write an AppleScript to duplicate the file to a temp folder, rename it and use the file from there.

But i have to consider sanboxing, so not really sure if i can do this.
Also i would not really want to do this in each and every case, so would need a way to look at the filename and detect if it's good, before passing off to an apple script handler if its not.

Re: Supporting Slovene characters

Posted: Fri Jun 07, 2013 10:41 am
by Mark
Gary,

I don't know the exact limitations of sandboxing. Perhaps you could make a small AppleScript applet that lets the user choose a file and pass on the chosen file to the shell with a do shell script command. That way, you don't need the tell command and may get around the sandbox if the applet is part of the signed application package.

Kind regards,

Mark

Re: Supporting Slovene characters

Posted: Fri Jun 07, 2013 10:54 am
by doobox
In my case i am currently all drag and drop files into the app.
It maybe that this makes it easier for me, i need to get my head round it :-)
I will have to do some tests and see if i can detect the bad chars that show in an input field as "?".
If i can i don't think it will be to difficult to do now you pointed me in the right direction.

Re: Supporting Slovene characters

Posted: Fri Jun 07, 2013 7:10 pm
by jacque
The sandbox allows a temp folder, so that part is okay. But I'd send in a bug report instead, the team can probably fix this easier than we can work around it. They've fixed similar file path issues in the past.

Re: Supporting Slovene characters

Posted: Fri Jun 07, 2013 7:29 pm
by Mark
Jacque,

This bug was reported almost 10 years ago.
http://quality.runrev.com/show_bug.cgi?id=674

Kind regards,

Mark

Re: Supporting Slovene characters

Posted: Fri Jun 07, 2013 7:52 pm
by jacque
Probably a good idea to add something to it then, so the team will notice it. It's old enough that it's probably not appearing on their lists, and I see no one has acknowledged it. It needs a bump.

Re: Supporting Slovene characters

Posted: Fri Jun 07, 2013 8:00 pm
by Mark
Hi Jacque,

It's status is"NEW", which means that someone acknowledged it at some time in the past before the new bug system was put into place and there was the intention to fix the bug.

Adding something to it is worth a try.

Best,

Mark