Supporting Slovene characters

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Supporting Slovene characters

Post by doobox » Tue Jun 04, 2013 12:24 pm

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
Kind Regards
Gary

https://www.doobox.co.uk

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Supporting Slovene characters

Post by Mark » Fri Jun 07, 2013 9:44 am

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
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

doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Re: Supporting Slovene characters

Post by doobox » Fri Jun 07, 2013 10:10 am

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.
Kind Regards
Gary

https://www.doobox.co.uk

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Supporting Slovene characters

Post by Mark » Fri Jun 07, 2013 10:41 am

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
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

doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Re: Supporting Slovene characters

Post by doobox » Fri Jun 07, 2013 10:54 am

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.
Kind Regards
Gary

https://www.doobox.co.uk

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Supporting Slovene characters

Post by jacque » Fri Jun 07, 2013 7:10 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Supporting Slovene characters

Post by Mark » Fri Jun 07, 2013 7:29 pm

Jacque,

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

Kind regards,

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Supporting Slovene characters

Post by jacque » Fri Jun 07, 2013 7:52 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Supporting Slovene characters

Post by Mark » Fri Jun 07, 2013 8:00 pm

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
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

Post Reply