JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

Problem with new Files Section
Goto page 1, 2  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> Web Site Issues
View previous topic :: View next topic  
Author Message
Mark Pierson
Expert


Joined: 03 Aug 2003
Posts: 3017
Location: Connecticut, USA

                    
PostPosted: Thu Oct 14, 2004 3:18 pm    Post subject: Problem with new Files Section Reply with quote

I'm not sure whether the problem is on my end or with the new File Section, but here's what I've noticed:

My system is configured to automatically open .txt files in a browser window. This is what prompted me to add the "Import" feature to KM in the first place. However, when I click the Download button on any of the new files, the resulting file is not formatted properly within the resulting browser window. For example, clicking the button yields:

Code:
Name:,Loewe TV,,,,v8.29,,,,,,,CURRENT DATA Devices:,RC-5,0,100,,,,,,,,, Manual:,,0 = 1-byte,LSB-COMP,86,NO,,,,,,, Setup:,1054,99 = URC-6131 PVR,02 - TV,OBC,USE,1F 5F 5F,1,,,,, URC-6131 PVR Device Upgrade Code:,,,,,,,,,,,,


As you can see, all the line breaks are missing, and this format doesn't work with KM's Import feature. The same file opened from Yahoo yields:

Code:
Name:,Loewe TV,,,,v8.29,,,,,,,CURRENT DATA
Devices:,RC-5,0,100,,,,,,,,,
Manual:,,0 = 1-byte,LSB-COMP,86,NO,,,,,,,
Setup:,1054,99 = URC-6131 PVR,02 - TV,OBC,USE,1F 5F 5F,1,,,,,
URC-6131 PVR Device Upgrade Code:,,,,,,,,,,,,


If I right-click the Download button and select Save Target As..., the contents are correct. This leads me to believe that there's some extra formatting (or lack thereof) occuring by whatever routine is creating the download ("dload.php?action=download&file_id=52").
_________________
Mark
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nils_Ekberg
Expert


Joined: 02 Aug 2003
Posts: 1689
Location: Near Albany, NY

                    
PostPosted: Thu Oct 14, 2004 3:33 pm    Post subject: Reply with quote

It looks like it is using Mac or Unix line breaks instead of DOS. I think IE only recognizes DOS on a Windows system.
_________________
Nils
Files Section
Diagnosis File Section
Back to top
View user's profile Send private message Send e-mail
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21210
Location: Chicago, IL

                    
PostPosted: Thu Oct 14, 2004 3:49 pm    Post subject: Reply with quote

I can't even get it to open the file in a browser window, I always get the "Save" or "Open" pop up. What is the URL of the file when you open it? What setting did you have to change to get the file to open in a window?
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
Mark Pierson
Expert


Joined: 03 Aug 2003
Posts: 3017
Location: Connecticut, USA

                    
PostPosted: Thu Oct 14, 2004 4:26 pm    Post subject: Reply with quote

The Robman wrote:
What is the URL of the file when you open it?

http://www.hifi-remote.com/forums/dload.php?action=file&file_id=52

Quote:
What setting did you have to change to get the file to open in a window?

IIRC, isn't there a checkbox in the dialog box that prompts you to Save or Open? Something like "Always use this app to open this type of file"...
_________________
Mark
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mark Pierson
Expert


Joined: 03 Aug 2003
Posts: 3017
Location: Connecticut, USA

                    
PostPosted: Thu Oct 14, 2004 4:34 pm    Post subject: Reply with quote

Nils_Ekberg wrote:
It looks like it is using Mac or Unix line breaks instead of DOS.

As far as I can tell the line breaks are being stripped entirely and are replaced with a <space>.
_________________
Mark
Back to top
View user's profile Send private message Send e-mail Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21210
Location: Chicago, IL

                    
PostPosted: Thu Oct 14, 2004 6:21 pm    Post subject: Reply with quote

Mark Pierson wrote:
The Robman wrote:
What is the URL of the file when you open it?

http://www.hifi-remote.com/forums/dload.php?action=file&file_id=52

That link just takes me to the page showing information about the file, so we must be seeing different things.

Mark Pierson wrote:
The Robman wrote:
What setting did you have to change to get the file to open in a window?

IIRC, isn't there a checkbox in the dialog box that prompts you to Save or Open? Something like "Always use this app to open this type of file"...

Yeah, but if you "open" the file this way, the file opens in Notepad and it looks perfectly normal. So I guess I'm still not seeing how you're getting to the point where the problem arises.

For me, I click on the link you posted and I see the info page, then I click on the DOWNLOAD button, which brings up the "open or save" pop-up. If I click on OPEN, I get the notepad file which looks correct.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
Mark Pierson
Expert


Joined: 03 Aug 2003
Posts: 3017
Location: Connecticut, USA

                    
PostPosted: Thu Oct 14, 2004 6:55 pm    Post subject: Reply with quote

The Robman wrote:
That link just takes me to the page showing information about the file, so we must be seeing different things.

I think I pasted the wrong URL before. Try this link: http://www.hifi-remote.com/forums/dload.php?action=download&file_id=52

Quote:
For me, I click on the link you posted and I see the info page, then I click on the DOWNLOAD button, which brings up the "open or save" pop-up. If I click on OPEN, I get the notepad file which looks correct.

Naturally, I can't find where IE and/or Windows is set to open a .txt file in a browser window. Confused

As I said before, if I right-click the Download button and select Save Target As..., the resulting file opens fine in Notepad. It's only the contents that are displayed within a browser window that are messed up without line breaks.

I'll keep hunting on my end to see if I can figure out how/where IE is hiding that setting.
_________________
Mark


Last edited by Mark Pierson on Thu Oct 14, 2004 7:02 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mark Pierson
Expert


Joined: 03 Aug 2003
Posts: 3017
Location: Connecticut, USA

                    
PostPosted: Thu Oct 14, 2004 7:00 pm    Post subject: Reply with quote

The Robman wrote:
For me, I click on the link you posted and I see the info page, then I click on the DOWNLOAD button, which brings up the "open or save" pop-up. If I click on OPEN, I get the notepad file which looks correct.

What happens when you click on a Yahoo file link?

http://groups.yahoo.com/group/jp1/files/3.%20Device%20Codes/TV/Advent_Q2035A_TV.txt

Do you still get the Save or Open dialog?
_________________
Mark
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mr_d_p_gumby
Expert


Joined: 03 Aug 2003
Posts: 1370
Location: Newbury Park, CA

                    
PostPosted: Thu Oct 14, 2004 7:35 pm    Post subject: Reply with quote

Mark Pierson wrote:
I think I pasted the wrong URL before. Try this link: http://www.hifi-remote.com/forums/dload.php?action=download&file_id=52
I downloaded & saved the file, then looked at it with a hex editor. The file has normal Windows line breaks (i.e., $0D $0A).
_________________
Mike England
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21210
Location: Chicago, IL

                    
PostPosted: Thu Oct 14, 2004 9:40 pm    Post subject: Reply with quote

Mark Pierson wrote:
I think I pasted the wrong URL before.
Try this link: http://www.hifi-remote.com/forums/dload.php?action=download&file_id=52

That link gives me the OPEN/SAVE pop-up.

Mark Pierson wrote:
What happens when you click on a Yahoo file link?

For those, the text file opens in a browser.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
e34m5



Joined: 14 Oct 2003
Posts: 675
Location: Atlanta

                    
PostPosted: Fri Oct 15, 2004 1:50 pm    Post subject: Reply with quote

I have my system set up to use Textpad. When I click on the URL it opens the file in TP with any problems. I also tried it with Notepad and it worked fine. I'm using XP sp2.
_________________
Paul
Back to top
View user's profile Send private message
pgk



Joined: 21 Aug 2004
Posts: 113
Location: London

                    
PostPosted: Fri Oct 15, 2004 2:34 pm    Post subject: Reply with quote

I think it a mime content-type problem.

The file section here returns the following in the headers:

Content-Type: application/force-download; name="Loewe_TV.txt"


Yahoo on the other hand I can't easily check (because of the silly sign in system and lynx not support https) but I would guess it would be like

Content-Type: text/plain

No line breaks would tend to imply those browsers not forcing the download are treating it as text/html where cr/lf are ignored.
Back to top
View user's profile Send private message
pgk



Joined: 21 Aug 2004
Posts: 113
Location: London

                    
PostPosted: Fri Oct 15, 2004 3:00 pm    Post subject: Reply with quote

Confirmed yahoo does return

Content-Type: text/plain

So I guess it's a question of it the phpBB extension allows that content type to be returned or not.
Back to top
View user's profile Send private message
Mark Pierson
Expert


Joined: 03 Aug 2003
Posts: 3017
Location: Connecticut, USA

                    
PostPosted: Fri Oct 15, 2004 5:27 pm    Post subject: Reply with quote

pgk wrote:
I think it a mime content-type problem.

The file section here returns the following in the headers:

Content-Type: application/force-download; name="Loewe_TV.txt"

...

No line breaks would tend to imply those browsers not forcing the download are treating it as text/html where cr/lf are ignored.

I think you're right on the Mime content problem. However, when I save the resulting web page from my browser, I don't see the "application/force-download", but rather a regular "text/html". Either way, the cr/lf's are being stripped from the content.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0070)http://www.hifi-remote.com/forums/dload.php?action=download&file_id=52 -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY>Name:,Loewe TV,,,,v8.29,,,,,,,CURRENT DATA Devices:,RC-5,0,100,,,,,,,,,
...
</BODY></HTML>

Quote:
So I guess it's a question of it the phpBB extension allows that content type to be returned or not.

Hopefully, this is the solution and, more importantly, someone can make the necessary changes. While I can live with it as is (knowing the workaround on my end), it would be nice to see it fixed for anyone else who runs into the same problem.
_________________
Mark
Back to top
View user's profile Send private message Send e-mail Visit poster's website
lucindrea
Site Admin


Joined: 05 Aug 2003
Posts: 37
Location: Philadelphia PA

                    
PostPosted: Sun Oct 17, 2004 7:40 am    Post subject: Reply with quote

the site uses php .... php , perl , cgi ( just a form of perl ) java , asp , etc .. they will all run into the same problem .. lf/cr in files served on a web server breaks the code used to serve them ( asp on microsofts servers are a little differnt because it does alot of converting on the server end , hence the reasion M$ web servers are so slow ) .. as a built in function most web servers and script compilers strip these breaks when serving the page , this is differnt then when you are downloading where the file is sent as binary and not text ..

this is the reasion you will see ALOT of 12k txt files ziped up ( on other pages , no idea how rob has done it here ) , to basicly force you to download them .. if right clicking and save file as works then do that , also keep in mind that IE doesnt play well with most of the worlds web servers ( mostly unix based ) because M$ is under the misguided inpression that not programing for the "standard" will force companies to use their web server ( it acctully just makes programers life more complex ) , so their is the off chance the IE is mis reading the mime types sent by the server ...
i cannot test this at home because i do not use IE , and i cant do much from work because i really cannot d/l anything to this system

their is also the chance that the line feeds got striped during the ftp trasnfer if they were sent txt and not binary , agin i would need to ask rob how he is sending them .. or if he is useing the on site script to send the files , then the php script may be striping the cr/lf also .. all the more reasion to zip em up.

i'll look into the mime type , but rember the upload/download section is made for files , not text.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> Web Site Issues All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control