More questions regarding Server oddities

Tim Selander selander at tkf.att.ne.jp
Fri Dec 25 19:35:11 EST 2015


Thanks all!

Just to re-cap, I'm having two problems on this little project. 
1) Showing UTF-8 correctly. I have "solved" this by using the 
older revolution server that On-Rev provides. 2) My text list of 
programs, from which I retrieve program title and host, suddenly 
'disappeared' as far as the script is concerned.

Tried Lyn's and Mike's suggestion to access the file directly 
(didn't know you could do that!) and it is working again!

Just in case those curious would like to see the problem, here is 
the script. It now dumps the contents of vlist; of course that 
will be cleaned up. But I will leave that script as it is now on 
the server for awhile....

Not sure what will happen with linewraps, but here goes*

<!DOCTYPE HTML>
<html>
     <head>
         <meta http-equiv="Content-type" content="text/html; 
charset=utf-8">
     </head>

<body>

<?rev
--get list of programs
put "The command <BR>put URL 
'http://pba.on-rev.com/ynh5list_UTF8.txt' into vlist<Br> results 
in vlist containing this: <BR>"

put URL "http://pba.on-rev.com/ynh5list_UTF8.txt" into vlist
put vlist
put URL "binfile:ynh5list_UTF8.txt" into vlist
put vlist


--calculate date and time for Japan
put the date && the time into vdate
convert vdate to dateitems
add 8 to item 4 of vdate
convert vdate to dateitems

--If date is Sunday, change to prev Saturday (not aired on Sundays)
if last item of vdate is "1" then subtract 1 from item 3 of vdate
convert vdate to dateitems

--create a variable with the broadcast date in FileMaker format 
(program list exported from Filemaker)
put item 1 of vdate & "/" & item 2 of vdate & "/" & item 3 of 
vdate into vFMdate

--get today's program information from CSV list
put line lineoffset(vFMdate,vlist) of vlist into vtoday

--add "0" to single digit days and months
if length(item 2 of vdate) = 1 then put "0" before item 2 of vdate
if length(item 3 of vdate) = 1 then put "0" before item 3 of vdate


if vtoday is empty then
put "番組を見つかりませんでした。申し訳ありません。" into vtoday
else
put item 1 of vtoday into vHosobi
put item 2 of vtoday into vTitle
put item 3 of vtoday into vHost
replace quote with empty in vHosobi
replace quote with empty in vTitle
replace quote with empty in vHost

put "http://pba-net.com/radio/05/yono" & item 1 of vdate & "_" & 
item 2 of vdate & item 3 of vdate & ".mp3" into vfile
end if
put vHosobi & "<BR>"
put vTitle & "<BR>"
put vHost & "<BR>"
put vfile & "<BR>"

?>

<audio src=<?rev put quote & vfile & quote ?> controls='' 
preload='metadata'></audio><BR>

</body></html>




Tim Selander
Tokyo, Japan





On 12/26/15, 6:52, Peter W A Wood wrote:
> Lyn
>
>> On 26 Dec 2015, at 05:34, Lyn Teyla <lyn.teyla at gmail.com> wrote:
>> 6.6.2 is not the latest version of LiveCode Server.
>>
>> The suggestion that I had put forth regarding the original issue was for Tim to perform both of the following:
>>
>> 1. Use the "put header" line provided;
> I don’t think the problem is related to the HTTP Header. It is the same for both Tim’s rev page and his lc page:
>
> 	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
>
>> and
>>
>> 2. Utilize any one of the latest versions of LiveCode: 6.7.8, 7.1.1 or 8.0.0dp12.
>>
>> That would indeed fix the original issue.
> Tim doesn’t really have a choice over which version of the server to use with the On-Rev service. The version is chosen by LiveCode.
>
> I suspect Tim will need to wait until LiveCode update the server before porting his scripts to .lc
>
> Regards
>
> Peter
>
>
> _______________________________________________
> 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