Re: Converting from unicode to ASCII

2020-09-22 Thread Richmond Mathewson via use-livecode
"This communication may be unlawfully collected and stored by the Agents of a large number of governments in secret. The parties to this email do not consent to the retrieving or storing of this communication and any related metadata, as well as printing, copying, re-transmitting,disseminating, or

Re: Converting from unicode to ASCII

2020-09-22 Thread Richmond Mathewson via use-livecode
Personally I think deleting everything that is not inwith the ASCII range is potentially a bit dangerous [suppose ALL the letters in the title are not inwith the ASCII range], so I would favour using some sort of lookup table/substitution list. Certainly letters such as accented 'e' can just be re

Re: Converting from unicode to ASCII

2020-09-22 Thread J. Landman Gay via use-livecode
On 9/22/20 10:42 PM, Mark Wieder via use-livecode wrote: On 9/22/20 7:58 PM, J. Landman Gay via use-livecode wrote: Is this just a temporary filename (not long-term storage)? No, the stacks are uploaded to AWS and remain there, retrieved from the server on request. There are currently hundre

Re: Converting from unicode to ASCII

2020-09-22 Thread Mark Wieder via use-livecode
On 9/22/20 7:58 PM, J. Landman Gay via use-livecode wrote: Is this just a temporary filename (not long-term storage)? No, the stacks are uploaded to AWS and remain there, retrieved from the server on request. There are currently hundreds of them with more added frequently. That's why I'm loo

Re: Converting from unicode to ASCII

2020-09-22 Thread J. Landman Gay via use-livecode
Combining responses: "NormalizeText" always returns unicode for all four of its variations, so no go. And as Paul pointed out, if the language is Chinese, deleting all non-ascii characters would leave nothing. On the other hand, we are only converting to Roman languages right now, so this might

Re: Converting from unicode to ASCII

2020-09-22 Thread John Balgenorth via use-livecode
You could easily convert it to HEX but that would make the file name exactly twice as long. JB > On Sep 22, 2020, at 4:43 PM, Bob Sneidar via use-livecode > wrote: > > There’s a tempname() function??? Ohhh fun!! > > Bob S > > > On Sep 22, 2020, at 4:22 PM, Mark Wieder via use-livecode > m

Re: Converting from unicode to ASCII

2020-09-22 Thread Bob Sneidar via use-livecode
There’s a tempname() function??? Ohhh fun!! Bob S On Sep 22, 2020, at 4:22 PM, Mark Wieder via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: Can you use tempname() to create and retrieve the stack? ___ use-livecode mailing list use-live

RE: Converting from unicode to ASCII

2020-09-22 Thread Ralph DiMola via use-livecode
How about converting the non ascii characters into to base 64 ascii? This could produce really long filenames. I guess you could truncate if needed. Also the filename would make no sense at all if it was all non ascii. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo

Re: Converting from unicode to ASCII

2020-09-22 Thread Mark Wieder via use-livecode
On 9/22/20 3:48 PM, J. Landman Gay via use-livecode wrote: I have a stack with an index. When a user clicks a line, a handler uses the clicktext to create a file name which is always the clicktext plus the ".livecode" extension. The stack is then downloaded from an AWS server and displayed. W

Re: Converting from unicode to ASCII

2020-09-22 Thread Paul Dupuis via use-livecode
On 9/22/2020 6:58 PM, Devin Asay via use-livecode wrote: But it that doesn’t help, and if nobody ever sees the filenames, why not just loop through the string and delete anything that’s not in ASCII range? Well, if the name is in Chinese,  you would delete the entire name. ___

Re: Converting from unicode to ASCII

2020-09-22 Thread Devin Asay via use-livecode
Hi Jacque, Have you looked at the normalizeText function? I’m not sure that would help, but maybe it’s a start. But it that doesn’t help, and if nobody ever sees the filenames, why not just loop through the string and delete anything that’s not in ASCII range? Devin > On Sep 22, 2020, at 4:48

Converting from unicode to ASCII

2020-09-22 Thread J. Landman Gay via use-livecode
I have a stack with an index. When a user clicks a line, a handler uses the clicktext to create a file name which is always the clicktext plus the ".livecode" extension. The stack is then downloaded from an AWS server and displayed. We are now translating some stacks to other languages which re

https put url not working first time

2020-09-22 Thread Ralph DiMola via use-livecode
I'm doing a: put url (https://somewhere.com/someFolder/file.ext) into url ("file:someLocalPath/file.ext") 90% of the time the first try fails but then all similar attempts work 100% correctly after that. When it fails the result is empty and the local file has a zero length. Has anyone se

Re: Create image from SVG widget

2020-09-22 Thread Klaus major-k via use-livecode
Hi Brian, > Am 22.09.2020 um 05:38 schrieb Brian Milby via use-livecode > : > > Here's a link to the post in the archives: > http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html > > I could get close, but still needed to work out a way to translate the path > to improve upo