Welcome to Geeklog, Anonymous Saturday, May 04 2024 @ 01:45 am EDT

Geeklog Forums

Displaying single quotes properly in imported RSS feeds


Will

Anonymous
I'm importing an RSS feed on my site but every time there's a single quote it gets written as a question mark. For example,

John's cat

would come across as:

John?s cat

Is there an option or something I can use to have geeklog escape the single quote's properly, or might this be a problem with the originating feed?

Thanks again for providing the best CMS out there,

Will
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
URL?

Often, the single quote is not really a single quote but some other special character that just looks like one. And in that case, the correct encoding of the feed is important.

bye, Dirk
 Quote

Will

Anonymous
URL of the rss feed is:

http://www.liberal.ca/rss/news_e.aspx?type=news

I see what you mean now. They're using those MS style single quotes. Any tips for getting around that?
 Quote

Will

Anonymous
Has anyone else had to convert curly quotes in an RSS feed to regular quotes? I've tried inserting functions at a few places but can't seem to make it work. Any help would be greatly appreciated.
 Quote

Status: offline

mevans

Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
Will,

I tested the RSS URL you gave above on my site which uses UTF-8 encoding and it displayed fine. My guess is that the feed is also using UTF-8 as the encoding and when displaying on a non-UTF-8 (iso-8859-1) site, the issue appears.

You might consider converting your site to UTF-8. It is a pretty straight forward process, but it does have some risk since you need to dump, drop and reload your database. I've written up how I did my conversion here. You might give it a read and see if you want to give it a shot.

Good luck,

Mark
 Quote

Will

Anonymous
Mark,

Thank you very much for pointing me in the right direction. There hadn't been a lot of content posted yet so I just deleted the database, made a new one set up for unicode, reinstalled Geeklog, and reposted the stories. This worked out very well because it's a Canadian site and needed to display french accents and such anyway. And the added bonus is that now I can use any international symbols for currency, scientific notation, and so on. I'm happy and grateful to you.

And this will certainly be the very last time I set up Geeklog using the default language settings. Might be a good idea to make the default utf8-english in the next version.

Finished version is at http://haldimandnorfolkliberals.com

 Quote

All times are EDT. The time is now 01:45 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content