|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
[WebSVN] RSS Feed -> utf-8Hi,
Why don't you generate a rss feed into utf-8 rather than iso? feedcreator.class.php line 497 ------------------------------------------------------ http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399183 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8That's a good question — that class is third-party code that WebSVN
uses. The 1.8.0-dev version of FeedCreator (http://feedcreator.org) does specify UTF-8 as the default. Since there's no way to specify the encoding externally (at least in 1.7.2, which we're using) it would have to be done by adding $this->encoding = "utf-8" at line 1022, inside the constructor for RSSCreator20. Ultimately, it would seem that a cleaner solution would be to allow UniversalFeedCreator.createFeed() to also accept the encoding, but oh well... Of course, there ARE other options for creating feeds, particularly since it appears we're only using RSS 2.0, not even Atom or anything else. I don't think there's any need for anything else, so perhaps simplified RSS creation/caching code would be a nice-to-have for down the road? - Quinn On Sep 24, 2009, at 1:36 AM, Yokav wrote: > Hi, > > Why don't you generate a rss feed into utf-8 rather than iso? > > feedcreator.class.php line 497 > > ------------------------------------------------------ > http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399183 > > To unsubscribe from this discussion, e-mail: [dev- > unsubscribe@...]. http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399361 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8Yes maybe, RSS is a static language you can write your feed and don't
need to update the code before a long time I think. So if you plan to use only RSS 2.0 feed it could be a good idea to simplified the RSS creation. At the same time it limit the feed to RSS 2.0 so if you plan to set an option which let the user choose which feed he want, it's better to continue to use this class. And feedcreator seems to be a little forget, feedcreator.org always displays the version 1.7.2 we've to go to http://sourceforge.net/projects/feedcreator/ to find the version 1.8.0. IMHO, in any case it's better to have the rss feed into utf-8. You recently update the code of websvn to improve it for utf-8 so it will be harm to have the find into ISO (except if we specified to use ISO for this current repo :p). Le 24/09/09 17:45, Quinn Taylor a écrit : > That's a good question — that class is third-party code that WebSVN > uses. The 1.8.0-dev version of FeedCreator (http://feedcreator.org) > does specify UTF-8 as the default. Since there's no way to specify the > encoding externally (at least in 1.7.2, which we're using) it would > have to be done by adding $this->encoding = "utf-8" at line 1022, > inside the constructor for RSSCreator20. Ultimately, it would seem > that a cleaner solution would be to allow > UniversalFeedCreator.createFeed() to also accept the encoding, but oh > well... > > Of course, there ARE other options for creating feeds, particularly > since it appears we're only using RSS 2.0, not even Atom or anything > else. I don't think there's any need for anything else, so perhaps > simplified RSS creation/caching code would be a nice-to-have for down > the road? > > - Quinn > > On Sep 24, 2009, at 1:36 AM, Yokav wrote: > >> Hi, >> >> Why don't you generate a rss feed into utf-8 rather than iso? >> >> feedcreator.class.php line 497 >> >> ------------------------------------------------------ >> http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399183 >> >> To unsubscribe from this discussion, e-mail: [dev- >> unsubscribe@...]. > > ------------------------------------------------------ > http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399361 > > To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. ------------------------------------------------------ http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399523 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8Forget what I said in the end of my previous mail: to use ISO for a
repository or not. That will not change anything because there is no difference display between commits, only the comment and the files modified. Thus the only content into rss feed (num of rev, comment, modified files) is utf-8 encoded, so the rss feed needs to be display always in utf-8. What's the solution? 1. Update FeedCreator library 2. Switch to another library which generate the rss feeds 3. Write your own rss feed. Le 24/09/09 19:03, Yokav a écrit : > Yes maybe, RSS is a static language you can write your feed and don't > need to update the code before a long time I think. So if you plan to > use only RSS 2.0 feed it could be a good idea to simplified the RSS > creation. At the same time it limit the feed to RSS 2.0 so if you plan > to set an option which let the user choose which feed he want, it's > better to continue to use this class. > > And feedcreator seems to be a little forget, feedcreator.org always > displays the version 1.7.2 we've to go to > http://sourceforge.net/projects/feedcreator/ to find the version 1.8.0. > > IMHO, in any case it's better to have the rss feed into utf-8. You > recently update the code of websvn to improve it for utf-8 so it will be > harm to have the find into ISO (except if we specified to use ISO for > this current repo :p). > > Le 24/09/09 17:45, Quinn Taylor a écrit : >> That's a good question — that class is third-party code that WebSVN >> uses. The 1.8.0-dev version of FeedCreator (http://feedcreator.org) >> does specify UTF-8 as the default. Since there's no way to specify the >> encoding externally (at least in 1.7.2, which we're using) it would >> have to be done by adding $this->encoding = "utf-8" at line 1022, >> inside the constructor for RSSCreator20. Ultimately, it would seem >> that a cleaner solution would be to allow >> UniversalFeedCreator.createFeed() to also accept the encoding, but oh >> well... >> >> Of course, there ARE other options for creating feeds, particularly >> since it appears we're only using RSS 2.0, not even Atom or anything >> else. I don't think there's any need for anything else, so perhaps >> simplified RSS creation/caching code would be a nice-to-have for down >> the road? >> >> - Quinn >> >> On Sep 24, 2009, at 1:36 AM, Yokav wrote: >> >>> Hi, >>> >>> Why don't you generate a rss feed into utf-8 rather than iso? >>> >>> feedcreator.class.php line 497 >>> >>> ------------------------------------------------------ >>> http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399183 >>> >>> To unsubscribe from this discussion, e-mail: [dev- >>> unsubscribe@...]. >> >> ------------------------------------------------------ >> http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399361 >> >> To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. > > ------------------------------------------------------ > http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399523 > > To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. > ------------------------------------------------------ http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399988 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8Okay, I changed the default for all feeds to UTF-8. I also committed
some much-needed improvements to rss.php, which make it shorter, simpler, and faster. http://trunk.websvn.info/diff.php?path=/trunk/rss.php&rev=926 - Quinn On Sep 24, 2009, at 10:03 AM, Yokav wrote: > Yes maybe, RSS is a static language you can write your feed and don't > need to update the code before a long time I think. So if you plan to > use only RSS 2.0 feed it could be a good idea to simplified the RSS > creation. At the same time it limit the feed to RSS 2.0 so if you plan > to set an option which let the user choose which feed he want, it's > better to continue to use this class. > > And feedcreator seems to be a little forget, feedcreator.org always > displays the version 1.7.2 we've to go to > http://sourceforge.net/projects/feedcreator/ to find the version > 1.8.0. > > IMHO, in any case it's better to have the rss feed into utf-8. You > recently update the code of websvn to improve it for utf-8 so it > will be > harm to have the find into ISO (except if we specified to use ISO for > this current repo :p). > > Le 24/09/09 17:45, Quinn Taylor a écrit : >> That's a good question — that class is third-party code that WebSVN >> uses. The 1.8.0-dev version of FeedCreator (http://feedcreator.org) >> does specify UTF-8 as the default. Since there's no way to specify >> the >> encoding externally (at least in 1.7.2, which we're using) it would >> have to be done by adding $this->encoding = "utf-8" at line 1022, >> inside the constructor for RSSCreator20. Ultimately, it would seem >> that a cleaner solution would be to allow >> UniversalFeedCreator.createFeed() to also accept the encoding, but oh >> well... >> >> Of course, there ARE other options for creating feeds, particularly >> since it appears we're only using RSS 2.0, not even Atom or anything >> else. I don't think there's any need for anything else, so perhaps >> simplified RSS creation/caching code would be a nice-to-have for down >> the road? >> >> - Quinn >> >> On Sep 24, 2009, at 1:36 AM, Yokav wrote: >> >>> Hi, >>> >>> Why don't you generate a rss feed into utf-8 rather than iso? >>> >>> feedcreator.class.php line 497 >>> >>> ------------------------------------------------------ >>> http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399183 >>> >>> To unsubscribe from this discussion, e-mail: [dev- >>> unsubscribe@...]. >> >> ------------------------------------------------------ >> http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399361 >> >> To unsubscribe from this discussion, e-mail: [dev- >> unsubscribe@...]. > > ------------------------------------------------------ > http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399523 > > To unsubscribe from this discussion, e-mail: [dev- > unsubscribe@...]. http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399997 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8Good, more cleaner code and all switch to utf-8! Thanks.
About the cache, I saw that you add a TODO. useCache call another function _redirect which display the cache file: Header("Content-Type: ".$this->contentType."; charset=".$this->encoding."; filename=".basename($filename)); Header("Content-Disposition: inline; filename=".basename($filename)); readfile($filename, "r"); die(); So you can remove this TODO, if there is a cache file, it's display and the script die(). Le 24/09/09 23:01, Quinn Taylor a écrit : > Okay, I changed the default for all feeds to UTF-8. I also committed > some much-needed improvements to rss.php, which make it shorter, > simpler, and faster. > > http://trunk.websvn.info/diff.php?path=/trunk/rss.php&rev=926 > > - Quinn > > > On Sep 24, 2009, at 10:03 AM, Yokav wrote: > >> Yes maybe, RSS is a static language you can write your feed and don't >> need to update the code before a long time I think. So if you plan to >> use only RSS 2.0 feed it could be a good idea to simplified the RSS >> creation. At the same time it limit the feed to RSS 2.0 so if you plan >> to set an option which let the user choose which feed he want, it's >> better to continue to use this class. >> >> And feedcreator seems to be a little forget, feedcreator.org always >> displays the version 1.7.2 we've to go to >> http://sourceforge.net/projects/feedcreator/ to find the version >> 1.8.0. >> >> IMHO, in any case it's better to have the rss feed into utf-8. You >> recently update the code of websvn to improve it for utf-8 so it >> will be >> harm to have the find into ISO (except if we specified to use ISO for >> this current repo :p). >> >> Le 24/09/09 17:45, Quinn Taylor a écrit : >>> That's a good question — that class is third-party code that WebSVN >>> uses. The 1.8.0-dev version of FeedCreator (http://feedcreator.org) >>> does specify UTF-8 as the default. Since there's no way to specify >>> the >>> encoding externally (at least in 1.7.2, which we're using) it would >>> have to be done by adding $this->encoding = "utf-8" at line 1022, >>> inside the constructor for RSSCreator20. Ultimately, it would seem >>> that a cleaner solution would be to allow >>> UniversalFeedCreator.createFeed() to also accept the encoding, but oh >>> well... >>> >>> Of course, there ARE other options for creating feeds, particularly >>> since it appears we're only using RSS 2.0, not even Atom or anything >>> else. I don't think there's any need for anything else, so perhaps >>> simplified RSS creation/caching code would be a nice-to-have for down >>> the road? >>> >>> - Quinn >>> >>> On Sep 24, 2009, at 1:36 AM, Yokav wrote: >>> >>>> Hi, >>>> >>>> Why don't you generate a rss feed into utf-8 rather than iso? >>>> >>>> feedcreator.class.php line 497 >>>> >>>> ------------------------------------------------------ >>>> http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399183 >>>> >>>> To unsubscribe from this discussion, e-mail: [dev- >>>> unsubscribe@...]. >>> >>> ------------------------------------------------------ >>> http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399361 >>> >>> To unsubscribe from this discussion, e-mail: [dev- >>> unsubscribe@...]. >> >> ------------------------------------------------------ >> http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399523 >> >> To unsubscribe from this discussion, e-mail: [dev- >> unsubscribe@...]. > > ------------------------------------------------------ > http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2399997 > > To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. ------------------------------------------------------ http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400159 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8Glad you like the changes. :-)
I hadn't yet examined how FeedCreator handled caching, but that is pretty simple. I think that instead of using a timeout, it's smarter to refresh if the file timestamp is earlier than the newest revision in the $history variable obtained from getLog(). Looking at it, the changes weren't at all difficult, so I added them in, too... http://trunk.websvn.info/diff.php?path=/trunk/rss.php&rev=929 It would be a simple matter to roll the RSS creation into this file and dispense with FeedCreator, but I think I'll save that for another day. ;-) - Quinn On Sep 25, 2009, at 2:40 AM, Yokav wrote: > Good, more cleaner code and all switch to utf-8! Thanks. > > About the cache, I saw that you add a TODO. > > useCache call another function _redirect which display the cache file: > > Header("Content-Type: ".$this->contentType."; > charset=".$this->encoding."; filename=".basename($filename)); > Header("Content-Disposition: inline; filename=".basename($filename)); > readfile($filename, "r"); > die(); > > So you can remove this TODO, if there is a cache file, it's display > and > the script die(). > > Le 24/09/09 23:01, Quinn Taylor a écrit : >> Okay, I changed the default for all feeds to UTF-8. I also committed >> some much-needed improvements to rss.php, which make it shorter, >> simpler, and faster. >> >> http://trunk.websvn.info/diff.php?path=/trunk/rss.php&rev=926 >> >> - Quinn http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400332 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8I've something for you, that's not perfect but could help you.
Le 25/09/09 19:10, Quinn Taylor a écrit : > Glad you like the changes. :-) > > I hadn't yet examined how FeedCreator handled caching, but that is > pretty simple. I think that instead of using a timeout, it's smarter > to refresh if the file timestamp is earlier than the newest revision > in the $history variable obtained from getLog(). Looking at it, the > changes weren't at all difficult, so I added them in, too... > > http://trunk.websvn.info/diff.php?path=/trunk/rss.php&rev=929 > > It would be a simple matter to roll the RSS creation into this file > and dispense with FeedCreator, but I think I'll save that for another > day. ;-) > > - Quinn > > > On Sep 25, 2009, at 2:40 AM, Yokav wrote: > >> Good, more cleaner code and all switch to utf-8! Thanks. >> >> About the cache, I saw that you add a TODO. >> >> useCache call another function _redirect which display the cache file: >> >> Header("Content-Type: ".$this->contentType."; >> charset=".$this->encoding."; filename=".basename($filename)); >> Header("Content-Disposition: inline; filename=".basename($filename)); >> readfile($filename, "r"); >> die(); >> >> So you can remove this TODO, if there is a cache file, it's display >> and >> the script die(). >> >> Le 24/09/09 23:01, Quinn Taylor a écrit : >>> Okay, I changed the default for all feeds to UTF-8. I also committed >>> some much-needed improvements to rss.php, which make it shorter, >>> simpler, and faster. >>> >>> http://trunk.websvn.info/diff.php?path=/trunk/rss.php&rev=926 >>> >>> - Quinn > > ------------------------------------------------------ > http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400332 > > To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400442 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8Thanks for the file — I adapted it a bit, tested against the current
RSS, made some improvements, and committed it. The FeedCreator class is gone now. :-) Turns out the FeedCreator defaults to a +0100 time zone offset, so my time stamps are correct now, whereas they were and hour early before. Please test and see if you find any issues. http://trunk.websvn.info/diff.php?repname=WebSVN&path=/trunk/rss.php&rev=930 Cheers, - Quinn On Sep 25, 2009, at 3:52 PM, Yokav wrote: > I've something for you, that's not perfect but could help you. > > <attachment> > > Le 25/09/09 19:10, Quinn Taylor a écrit : >> Glad you like the changes. :-) >> >> I hadn't yet examined how FeedCreator handled caching, but that is >> pretty simple. I think that instead of using a timeout, it's smarter >> to refresh if the file timestamp is earlier than the newest revision >> in the $history variable obtained from getLog(). Looking at it, the >> changes weren't at all difficult, so I added them in, too... >> >> http://trunk.websvn.info/diff.php?path=/trunk/rss.php&rev=929 >> >> It would be a simple matter to roll the RSS creation into this file >> and dispense with FeedCreator, but I think I'll save that for another >> day. ;-) >> >> - Quinn >> >> >> On Sep 25, 2009, at 2:40 AM, Yokav wrote: >> >>> Good, more cleaner code and all switch to utf-8! Thanks. http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400494 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8Thanks, it seems to be ok ! Just one or things.
Why did you removed the trailing \n ? Without it all the rss is write into one line, we lost the rss structure of the code. Maybe that it saves more space into the hard disk but it's really less human readable. Have add htmlspecialchars to titles and descriptions is a good idea but there is some problems, eg: <title>Révision 8 - Mise à jour de trunk....</title> à become à <description><div><strong>yokav —...</description> — become — Le 26/09/09 06:57, Quinn Taylor a écrit : > Thanks for the file — I adapted it a bit, tested against the current > RSS, made some improvements, and committed it. The FeedCreator class > is gone now. :-) Turns out the FeedCreator defaults to a +0100 time > zone offset, so my time stamps are correct now, whereas they were and > hour early before. Please test and see if you find any issues. > > http://trunk.websvn.info/diff.php?repname=WebSVN&path=/trunk/rss.php&rev=930 > > Cheers, > - Quinn > > On Sep 25, 2009, at 3:52 PM, Yokav wrote: > >> I've something for you, that's not perfect but could help you. >> >> <attachment> >> >> Le 25/09/09 19:10, Quinn Taylor a écrit : >>> Glad you like the changes. :-) >>> >>> I hadn't yet examined how FeedCreator handled caching, but that is >>> pretty simple. I think that instead of using a timeout, it's smarter >>> to refresh if the file timestamp is earlier than the newest revision >>> in the $history variable obtained from getLog(). Looking at it, the >>> changes weren't at all difficult, so I added them in, too... >>> >>> http://trunk.websvn.info/diff.php?path=/trunk/rss.php&rev=929 >>> >>> It would be a simple matter to roll the RSS creation into this file >>> and dispense with FeedCreator, but I think I'll save that for another >>> day. ;-) >>> >>> - Quinn >>> >>> >>> On Sep 25, 2009, at 2:40 AM, Yokav wrote: >>> >>>> Good, more cleaner code and all switch to utf-8! Thanks. > > ------------------------------------------------------ > http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400494 > > To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. ------------------------------------------------------ http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400534 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8Maybe that it could be interesting to use the template system of websvn
to generate the rss feed, I haven't look at the code of the template system so I'm not sure if it's possible/really interesting. Le 26/09/09 14:52, Yokav a écrit : > Thanks, it seems to be ok ! Just one or things. > > Why did you removed the trailing \n ? Without it all the rss is write > into one line, we lost the rss structure of the code. Maybe that it > saves more space into the hard disk but it's really less human readable. > > Have add htmlspecialchars to titles and descriptions is a good idea but > there is some problems, eg: > > <title>Révision 8 - Miseà jour de trunk....</title> > à becomeà > > <description><div><strong>yokav—...</description> > — become— > > > Le 26/09/09 06:57, Quinn Taylor a écrit : >> Thanks for the file — I adapted it a bit, tested against the current >> RSS, made some improvements, and committed it. The FeedCreator class >> is gone now. :-) Turns out the FeedCreator defaults to a +0100 time >> zone offset, so my time stamps are correct now, whereas they were and >> hour early before. Please test and see if you find any issues. >> >> http://trunk.websvn.info/diff.php?repname=WebSVN&path=/trunk/rss.php&rev=930 >> >> Cheers, >> - Quinn >> >> On Sep 25, 2009, at 3:52 PM, Yokav wrote: >> >>> I've something for you, that's not perfect but could help you. >>> >>> <attachment> >>> >>> Le 25/09/09 19:10, Quinn Taylor a écrit : >>>> Glad you like the changes. :-) >>>> >>>> I hadn't yet examined how FeedCreator handled caching, but that is >>>> pretty simple. I think that instead of using a timeout, it's smarter >>>> to refresh if the file timestamp is earlier than the newest revision >>>> in the $history variable obtained from getLog(). Looking at it, the >>>> changes weren't at all difficult, so I added them in, too... >>>> >>>> http://trunk.websvn.info/diff.php?path=/trunk/rss.php&rev=929 >>>> >>>> It would be a simple matter to roll the RSS creation into this file >>>> and dispense with FeedCreator, but I think I'll save that for another >>>> day. ;-) >>>> >>>> - Quinn >>>> >>>> >>>> On Sep 25, 2009, at 2:40 AM, Yokav wrote: >>>> >>>>> Good, more cleaner code and all switch to utf-8! Thanks. >> >> ------------------------------------------------------ >> http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400494 >> >> To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. > > ------------------------------------------------------ > http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400534 > > To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. > ------------------------------------------------------ http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400545 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8Generally I agree with you about having newlines and human-readable
structure. However, does anyone read RSS source directly? I wasn't thinking disk space so much as speed of generation (dealing with "magic strings" and escape characters) and size when transferring over the wire. When I need to examine XML structure, I usually use a "Pretty Print XML" function in my editor, SubEthaEdit. If there's really a need, we could put newlines back in, but I'd suggest waiting until there's a demonstrable reason to do so. Good catch, that can cause issues for ampersands... I can certainly avoid escaping the em-dash in the description. Other than that, isn't this an existing problem from before? Rather than using a PHP function to escape characters, would it work to wrap the text in CDATA delimiters? http://xml.silmaril.ie/authors/cdata/ Do your log messages include the sequence "à"? If so, what's the intended way for them to display? Do they show up in the RSS feed the same way they do on revision.php? - Quinn On Sep 26, 2009, at 5:52 AM, Yokav wrote: > Thanks, it seems to be ok ! Just one or things. > > Why did you removed the trailing \n ? Without it all the rss is write > into one line, we lost the rss structure of the code. Maybe that it > saves more space into the hard disk but it's really less human > readable. > > Have add htmlspecialchars to titles and descriptions is a good idea > but > there is some problems, eg: > > <title>Révision 8 - Mise à jour de trunk....</title> > à become à > > <description><div><strong>yokav —...</ > description> > — become — > > > Le 26/09/09 06:57, Quinn Taylor a écrit : >> Thanks for the file — I adapted it a bit, tested against the current >> RSS, made some improvements, and committed it. The FeedCreator class >> is gone now. :-) Turns out the FeedCreator defaults to a +0100 time >> zone offset, so my time stamps are correct now, whereas they were and >> hour early before. Please test and see if you find any issues. >> >> http://trunk.websvn.info/diff.php?repname=WebSVN&path=/trunk/rss.php&rev=930 >> >> Cheers, >> - Quinn >> >> On Sep 25, 2009, at 3:52 PM, Yokav wrote: >> >>> I've something for you, that's not perfect but could help you. >>> >>> <attachment> >>> >>> Le 25/09/09 19:10, Quinn Taylor a écrit : >>>> Glad you like the changes. :-) >>>> >>>> I hadn't yet examined how FeedCreator handled caching, but that is >>>> pretty simple. I think that instead of using a timeout, it's >>>> smarter >>>> to refresh if the file timestamp is earlier than the newest >>>> revision >>>> in the $history variable obtained from getLog(). Looking at it, the >>>> changes weren't at all difficult, so I added them in, too... >>>> >>>> http://trunk.websvn.info/diff.php?path=/trunk/rss.php&rev=929 >>>> >>>> It would be a simple matter to roll the RSS creation into this file >>>> and dispense with FeedCreator, but I think I'll save that for >>>> another >>>> day. ;-) >>>> >>>> - Quinn >>>> >>>> >>>> On Sep 25, 2009, at 2:40 AM, Yokav wrote: >>>> >>>>> Good, more cleaner code and all switch to utf-8! Thanks. >> >> ------------------------------------------------------ >> http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400494 >> >> To unsubscribe from this discussion, e-mail: [dev- >> unsubscribe@...]. > > ------------------------------------------------------ > http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400534 > > To unsubscribe from this discussion, e-mail: [dev- > unsubscribe@...]. http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400558 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8It would be possible, and perhaps interesting... It would be possible
to do that, but then the burden of creating the RSS would be duplicated in the template. Also, since most RSS is "style-less", there's not much potential for customizing appearance other than what is displayed and how it the description is formatted in HTML, etc. On Sep 26, 2009, at 6:28 AM, Yokav wrote: > Maybe that it could be interesting to use the template system of > websvn > to generate the rss feed, I haven't look at the code of the template > system so I'm not sure if it's possible/really interesting. ------------------------------------------------------ http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400564 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8Also, if the RSS is saved to a .xml file, Firefox does a pretty good
job of showing the structure, including highlighting. - Quinn On Sep 26, 2009, at 5:52 AM, Yokav wrote: > Thanks, it seems to be ok ! Just one or things. > > Why did you removed the trailing \n ? Without it all the rss is write > into one line, we lost the rss structure of the code. Maybe that it > saves more space into the hard disk but it's really less human > readable. ------------------------------------------------------ http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400626 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8It could let the end user personnalize his feeds, maybe modify them to
atom, etc. Without having to modify a php file, only a template file which should be more easy. That's the only reason, but if it needs a lot of work or will consume more ressource it's not interesting. It's just an idea, I don't need personnaly this feature. :) Le 26/09/09 16:45, Quinn Taylor a écrit : > It would be possible, and perhaps interesting... It would be possible > to do that, but then the burden of creating the RSS would be > duplicated in the template. Also, since most RSS is "style-less", > there's not much potential for customizing appearance other than what > is displayed and how it the description is formatted in HTML, etc. > > On Sep 26, 2009, at 6:28 AM, Yokav wrote: > >> Maybe that it could be interesting to use the template system of >> websvn >> to generate the rss feed, I haven't look at the code of the template >> system so I'm not sure if it's possible/really interesting. > > ------------------------------------------------------ > http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400564 > > To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. ------------------------------------------------------ http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400746 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8> Generally I agree with you about having newlines and human-readable
> structure. However, does anyone read RSS source directly? I wasn't > thinking disk space so much as speed of generation (dealing with > "magic strings" and escape characters) and size when transferring over > the wire. When I need to examine XML structure, I usually use a > "Pretty Print XML" function in my editor, SubEthaEdit. If there's > really a need, we could put newlines back in, but I'd suggest waiting > until there's a demonstrable reason to do so. I'm agree, it's just an idea too. ;) If nobody here need it, it can stay like this. > Good catch, that can cause issues for ampersands... I can certainly > avoid escaping the em-dash in the description. Other than that, isn't > this an existing problem from before? Rather than using a PHP function > to escape characters, would it work to wrap the text in CDATA > delimiters? > > http://xml.silmaril.ie/authors/cdata/ > > Do your log messages include the sequence "à"? If so, what's > the intended way for them to display? Do they show up in the RSS feed > the same way they do on revision.php? A problem from before, not I don't think, I haven't see this before. For CDATA it could be a solution but I'm really not conversant with this so I can't answer. The log message don't include "à" but "à". No problem on revision.php. You can look at this here: http://svn.tutux.be/AoK.html. It's an old project that I'm currently upgrading, so there is some errors in the theme, etc. > - Quinn > > On Sep 26, 2009, at 5:52 AM, Yokav wrote: > >> Thanks, it seems to be ok ! Just one or things. >> >> Why did you removed the trailing \n ? Without it all the rss is write >> into one line, we lost the rss structure of the code. Maybe that it >> saves more space into the hard disk but it's really less human >> readable. >> >> Have add htmlspecialchars to titles and descriptions is a good idea >> but >> there is some problems, eg: >> >> <title>Révision 8 - Miseà jour de trunk....</title> >> à becomeà >> >> <description><div><strong>yokav—...</ >> description> >> — become— >> >> >> Le 26/09/09 06:57, Quinn Taylor a écrit : >>> Thanks for the file — I adapted it a bit, tested against the current >>> RSS, made some improvements, and committed it. The FeedCreator class >>> is gone now. :-) Turns out the FeedCreator defaults to a +0100 time >>> zone offset, so my time stamps are correct now, whereas they were and >>> hour early before. Please test and see if you find any issues. >>> >>> http://trunk.websvn.info/diff.php?repname=WebSVN&path=/trunk/rss.php&rev=930 >>> >>> Cheers, >>> - Quinn >>> >>> On Sep 25, 2009, at 3:52 PM, Yokav wrote: >>> >>>> I've something for you, that's not perfect but could help you. >>>> >>>> <attachment> >>>> >>>> Le 25/09/09 19:10, Quinn Taylor a écrit : >>>>> Glad you like the changes. :-) >>>>> >>>>> I hadn't yet examined how FeedCreator handled caching, but that is >>>>> pretty simple. I think that instead of using a timeout, it's >>>>> smarter >>>>> to refresh if the file timestamp is earlier than the newest >>>>> revision >>>>> in the $history variable obtained from getLog(). Looking at it, the >>>>> changes weren't at all difficult, so I added them in, too... >>>>> >>>>> http://trunk.websvn.info/diff.php?path=/trunk/rss.php&rev=929 >>>>> >>>>> It would be a simple matter to roll the RSS creation into this file >>>>> and dispense with FeedCreator, but I think I'll save that for >>>>> another >>>>> day. ;-) >>>>> >>>>> - Quinn >>>>> >>>>> >>>>> On Sep 25, 2009, at 2:40 AM, Yokav wrote: >>>>> >>>>>> Good, more cleaner code and all switch to utf-8! Thanks. >>> >>> ------------------------------------------------------ >>> http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400494 >>> >>> To unsubscribe from this discussion, e-mail: [dev- >>> unsubscribe@...]. >> >> ------------------------------------------------------ >> http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400534 >> >> To unsubscribe from this discussion, e-mail: [dev- >> unsubscribe@...]. > > ------------------------------------------------------ > http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400558 > > To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. ------------------------------------------------------ http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400770 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8Turns out CDATA wrapping isn't a good idea in this case, since we want
to display HTML. Looking at it, here's what I see: the log message comes from $svnrep- >getLog() with the accents already escaped to HTML entities, so using htmlspecialchars() only converts < > and & to their escaped form. By everything I read, this is the correct thing to do. In fact, the RSS link you sent works fine in Safari, but Firefox shows the odd unescaped HTML in the title. (The exact same log message text appears correctly in the item's description, with the HTML entities processed.) I tested the feed in the most popular RSS readers on OS X (everything from http://www.lifehack.org/articles/technology/5-mac-os-x-rss-readers-worth-giving-a-shot.html but Google Reader) and all of them interpreted the accented characters in the title correctly. It would seem Firefox is the odd one out here... BTW, one thing I did fix in the latest commit is switching <author> (which expects an email address) to the more free-form <dc:creator> (see http://www.rssboard.org/rss-profile#namespace-elements-dublin-creator ) which makes the feed validate. - Quinn > On Sep 26, 2009, at 12:20 PM, Yokav wrote: > > A problem from before, not I don't think, I haven't see this before. > > For CDATA it could be a solution but I'm really not conversant with > this > so I can't answer. > > The log message don't include "à" but "à". No problem on > revision.php. > > You can look at this here: http://svn.tutux.be/AoK.html. It's an old > project that I'm currently upgrading, so there is some errors in the > theme, etc. > >> Good catch, that can cause issues for ampersands... I can certainly >> avoid escaping the em-dash in the description. Other than that, isn't >> this an existing problem from before? Rather than using a PHP >> function >> to escape characters, would it work to wrap the text in CDATA >> delimiters? >> >> http://xml.silmaril.ie/authors/cdata/ >> >> Do your log messages include the sequence "à"? If so, what's >> the intended way for them to display? Do they show up in the RSS feed >> the same way they do on revision.php? >> >> - Quinn >> >>> On Sep 26, 2009, at 5:52 AM, Yokav wrote: >>> >>> Have add htmlspecialchars to titles and descriptions is a good idea >>> but >>> there is some problems, eg: >>> >>> <title>Révision 8 - Miseà jour de trunk....</title> >>> à becomeà >>> >>> <description><div><strong>yokav—...</ >>> description> >>> — become— http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400841 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8Yes, I'm using Firefox and it shows the à.
After some googling about special chars into a xml file, it seems that only the <, >, ', ", & need to be converted to html entities. And for the other special chars I'm not sure actually. Le 27/09/09 03:55, Quinn Taylor a écrit : > Turns out CDATA wrapping isn't a good idea in this case, since we want > to display HTML. > > Looking at it, here's what I see: the log message comes from $svnrep- > >getLog() with the accents already escaped to HTML entities, so using > htmlspecialchars() only converts< > and& to their escaped form. By > everything I read, this is the correct thing to do. In fact, the RSS > link you sent works fine in Safari, but Firefox shows the odd > unescaped HTML in the title. (The exact same log message text appears > correctly in the item's description, with the HTML entities > processed.) I tested the feed in the most popular RSS readers on OS X > (everything from http://www.lifehack.org/articles/technology/5-mac-os-x-rss-readers-worth-giving-a-shot.html > but Google Reader) and all of them interpreted the accented > characters in the title correctly. It would seem Firefox is the odd > one out here... > > BTW, one thing I did fix in the latest commit is switching<author> > (which expects an email address) to the more free-form<dc:creator> > (see http://www.rssboard.org/rss-profile#namespace-elements-dublin-creator > ) which makes the feed validate. > > - Quinn > >> On Sep 26, 2009, at 12:20 PM, Yokav wrote: >> >> A problem from before, not I don't think, I haven't see this before. >> >> For CDATA it could be a solution but I'm really not conversant with >> this >> so I can't answer. >> >> The log message don't include "à" but "à". No problem on >> revision.php. >> >> You can look at this here: http://svn.tutux.be/AoK.html. It's an old >> project that I'm currently upgrading, so there is some errors in the >> theme, etc. >> >>> Good catch, that can cause issues for ampersands... I can certainly >>> avoid escaping the em-dash in the description. Other than that, isn't >>> this an existing problem from before? Rather than using a PHP >>> function >>> to escape characters, would it work to wrap the text in CDATA >>> delimiters? >>> >>> http://xml.silmaril.ie/authors/cdata/ >>> >>> Do your log messages include the sequence "à"? If so, what's >>> the intended way for them to display? Do they show up in the RSS feed >>> the same way they do on revision.php? >>> >>> - Quinn >>> >>>> On Sep 26, 2009, at 5:52 AM, Yokav wrote: >>>> >>>> Have add htmlspecialchars to titles and descriptions is a good idea >>>> but >>>> there is some problems, eg: >>>> >>>> <title>Révision 8 - Miseà jour de trunk....</title> >>>> à becomeà >>>> >>>> <description><div><strong>yokav—...</ >>>> description> >>>> — become— > > ------------------------------------------------------ > http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400841 > > To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. ------------------------------------------------------ http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400884 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8Think that this could be the answer:
htmlspecialchars(html_entity_decode($variable, ENT_QUOTES, "utf-8")) It's important to set the "utf-8" for entity_decode or it will use ISO but default. Le 27/09/09 12:35, Yokav a écrit : > Yes, I'm using Firefox and it shows theà. > > After some googling about special chars into a xml file, it seems that > only the<,>, ', ",& need to be converted to html entities. And for > the other special chars I'm not sure actually. > > Le 27/09/09 03:55, Quinn Taylor a écrit : >> Turns out CDATA wrapping isn't a good idea in this case, since we want >> to display HTML. >> >> Looking at it, here's what I see: the log message comes from $svnrep- >> >getLog() with the accents already escaped to HTML entities, so using >> htmlspecialchars() only converts< > and& to their escaped form. By >> everything I read, this is the correct thing to do. In fact, the RSS >> link you sent works fine in Safari, but Firefox shows the odd >> unescaped HTML in the title. (The exact same log message text appears >> correctly in the item's description, with the HTML entities >> processed.) I tested the feed in the most popular RSS readers on OS X >> (everything from http://www.lifehack.org/articles/technology/5-mac-os-x-rss-readers-worth-giving-a-shot.html >> but Google Reader) and all of them interpreted the accented >> characters in the title correctly. It would seem Firefox is the odd >> one out here... >> >> BTW, one thing I did fix in the latest commit is switching<author> >> (which expects an email address) to the more free-form<dc:creator> >> (see http://www.rssboard.org/rss-profile#namespace-elements-dublin-creator >> ) which makes the feed validate. >> >> - Quinn >> >>> On Sep 26, 2009, at 12:20 PM, Yokav wrote: >>> >>> A problem from before, not I don't think, I haven't see this before. >>> >>> For CDATA it could be a solution but I'm really not conversant with >>> this >>> so I can't answer. >>> >>> The log message don't include "à" but "à". No problem on >>> revision.php. >>> >>> You can look at this here: http://svn.tutux.be/AoK.html. It's an old >>> project that I'm currently upgrading, so there is some errors in the >>> theme, etc. >>> >>>> Good catch, that can cause issues for ampersands... I can certainly >>>> avoid escaping the em-dash in the description. Other than that, isn't >>>> this an existing problem from before? Rather than using a PHP >>>> function >>>> to escape characters, would it work to wrap the text in CDATA >>>> delimiters? >>>> >>>> http://xml.silmaril.ie/authors/cdata/ >>>> >>>> Do your log messages include the sequence "à"? If so, what's >>>> the intended way for them to display? Do they show up in the RSS feed >>>> the same way they do on revision.php? >>>> >>>> - Quinn >>>> >>>>> On Sep 26, 2009, at 5:52 AM, Yokav wrote: >>>>> >>>>> Have add htmlspecialchars to titles and descriptions is a good idea >>>>> but >>>>> there is some problems, eg: >>>>> >>>>> <title>Révision 8 - Miseà jour de trunk....</title> >>>>> à becomeà >>>>> >>>>> <description><div><strong>yokav—...</ >>>>> description> >>>>> — become— >> >> ------------------------------------------------------ >> http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400841 >> >> To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. > > ------------------------------------------------------ > http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400884 > > To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. > ------------------------------------------------------ http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400886 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
|
|
Re: [WebSVN] RSS Feed -> utf-8I went one further and modified svnlook.php to convert the authors and
messages to UTF-8 instead of encoding HTML entities. I also made a few more tweaks to rss.php that make it display much better in Firefox, and even deals with HTML/XML tags in the log message. :-) - Quinn On Sep 27, 2009, at 4:12 AM, Yokav wrote: > Think that this could be the answer: > > htmlspecialchars(html_entity_decode($variable, ENT_QUOTES, "utf-8")) > > It's important to set the "utf-8" for entity_decode or it will use ISO > but default. > > Le 27/09/09 12:35, Yokav a écrit : >> Yes, I'm using Firefox and it shows theà. >> >> After some googling about special chars into a xml file, it seems >> that >> only the<,>, ', ",& need to be converted to html entities. And for >> the other special chars I'm not sure actually. >> >> Le 27/09/09 03:55, Quinn Taylor a écrit : >>> Turns out CDATA wrapping isn't a good idea in this case, since we >>> want >>> to display HTML. >>> >>> Looking at it, here's what I see: the log message comes from >>> $svnrep- >>>> getLog() with the accents already escaped to HTML entities, so >>>> using >>> htmlspecialchars() only converts< > and& to their escaped >>> form. By >>> everything I read, this is the correct thing to do. In fact, the RSS >>> link you sent works fine in Safari, but Firefox shows the odd >>> unescaped HTML in the title. (The exact same log message text >>> appears >>> correctly in the item's description, with the HTML entities >>> processed.) I tested the feed in the most popular RSS readers on >>> OS X >>> (everything from http://www.lifehack.org/articles/technology/5-mac-os-x-rss-readers-worth-giving-a-shot.html >>> but Google Reader) and all of them interpreted the accented >>> characters in the title correctly. It would seem Firefox is the odd >>> one out here... >>> >>> BTW, one thing I did fix in the latest commit is switching<author> >>> (which expects an email address) to the more free-form<dc:creator> >>> (see http://www.rssboard.org/rss-profile#namespace-elements-dublin-creator >>> ) which makes the feed validate. >>> >>> - Quinn http://websvn.tigris.org/ds/viewMessage.do?dsForumId=1547&dsMessageId=2400915 To unsubscribe from this discussion, e-mail: [dev-unsubscribe@...]. |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |