URL File extra spaces

Peter M. Brigham pmbrig at gmail.com
Sat Mar 9 12:22:28 EST 2013


I recall a thread on this problem a year or two ago, can't find in in Gmane, though. It did have to do with UTF-8 vs UTF-16. You have to unidecode the text then uniencode it again (or vice versa) to change it from UTF-16 to UTF-8 (or vice versa). Sorry I can't recall the details.

As far as the filter command, your problem is that filter only works on whole lines (check the dictionary for the filter command). "Filter tContainer without space" will only delete any lines that consist of a space. You could use the "replace" command instead:

replace space with empty in fld "Input"

but that would take out word divisions as well. Best to work out the UTF problem, probably.

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig


On Mar 9, 2013, at 10:32 AM, Thomas McGrath III wrote:

> I don't know what the heck is going on here. I can't even filter the resulting field without spaces.
> 
> filter field "Input" without spaces
> 
> yet the field still has the spaces
> 
> I then in a button tried with one of the spaces selected and get 32 so I know it's a space:
> 
> answer charToNum(the selectedText of field "Input")
> 
> Then why does the filter not work????
> 
> 
> aaargh
> 
> Tom
> 
> -- Tom McGrath III
> http://lazyriver.on-rev.com
> mcgrath3 at mac.com
> 
> On Mar 9, 2013, at 9:45 AM, Thomas McGrath III <mcgrath3 at mac.com> wrote:
> 
>> I am getting back an extra space between each character when getting the contents of a file. Any ideas how this is happening? Why? How to fix it?
>> 
>> 
>> The text in the file is:
>> 09-03-2013 09:01:16 F3 F3 F3 
>> 
>> and the text I am getting back with extra spaces:
>> 0 9 - 0 3 - 2 0 1 3   0 9 : 0 1 : 1 6   F 3   F 3   F 3
>> 
>> Here is the code:
>> 
>> function TAGetEvent
>>         put URL  ("file:" & (specialFolderPath("Support") & slash & "KeyTrapper" & slash & "Events.txt")) into tFile
>>         return  tFile
>> end TAGetEvent
>> 
>> 
>> 
>> Thanks,
>> 
>> Tom
>> 
>> -- Tom McGrath III
>> http://lazyriver.on-rev.com
>> mcgrath3 at mac.com
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list