Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Apostrophe symbol ' is coming through as (see screenshot)

Options
  • 13-01-2015 11:41pm
    #1
    Registered Users Posts: 324 ✭✭


    Hi,

    I'm using Google Alerts for some RSS feeds but for titles that contains an apostrophe symbol ' it is coming through as (see screenshot)

    These characters are coming direct from the feed, you can see them in it - https://www.google.ie/alerts/feeds/00705490796826983622/3241858734532630058

    I tried a Replacement Variable but that did nothing.

    Anyone know how can I fix this?


Comments

  • Registered Users Posts: 1,717 ✭✭✭Raging_Ninja


    iPaddyM wrote: »
    Hi,

    I'm using Google Alerts for some RSS feeds but for titles that contains an apostrophe symbol ' it is coming through as (see screenshot)

    These characters are coming direct from the feed, you can see them in it - https://www.google.ie/alerts/feeds/00705490796826983622/3241858734532630058

    I tried a Replacement Variable but that did nothing.

    Anyone know how can I fix this?

    Tis HTML encoded - you need to check out how to parse it back to the desired value on your application. Quick google should deal with it.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    How are you handling the feed for display? What are you using?


  • Registered Users Posts: 241 ✭✭fcrossen


    The apostrophe character is being encoded twice. I guess that it is already encoded in the feed and being encoded a second time by whatever CMS you are using.

    You should either use the encoded data from your feed, and *not* encode when you output to the browser, or (if you cannot disable encoding in your CMS) decode the characters and let the CMS encode the raw text.


  • Registered Users Posts: 324 ✭✭iPaddyM


    Thanks for the replies.

    This is what I'm doing;

    1. Using that feed from Google Alerts (https://www.google.ie/alerts/feeds/00705490796826983622/3241858734532630058).
    2. I'm then putting it through feedburner because I'm using vBulletins' (4.2.2) RSS Feed manager to post threads to a forum section and I was getting this error - XML Error: not well-formed (invalid token) at Line 1 - and I don't get that error now with feedburner.

    In my vB Admincp my "HTML Character Set" is set to - ISO-8859-1

    Is this information of use?

    Thanks in advance


  • Registered Users Posts: 241 ✭✭fcrossen


    There's nothing wrong with the XML feed. However I don't use vB so I can't help further.

    Check what happens to the data each time it is processed. I.e:
    Google XML -> Feedburner -> vB


  • Advertisement
  • Registered Users Posts: 324 ✭✭iPaddyM


    Are these not errors in the feed? Shouldn't they be apostrophes ?


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    iPaddyM wrote: »
    Are these not errors in the feed? Shouldn't they be apostrophes ?
    No. They're correctly encoded for inclusion in an XML document.

    What appears to be happening is that they're not being parsed correctly by vB and thus remain codified. As with fcrossen, I cannot say why as I don't use vB either.

    You may have better luck on the Design forum with this. Development is more for 'how do I fix this in the code' while you appear to have more of a 'how do I fix this in the CMS' question.


  • Registered Users Posts: 324 ✭✭iPaddyM


    No. They're correctly encoded for inclusion in an XML document.

    What appears to be happening is that they're not being parsed correctly by vB and thus remain codified. As with fcrossen, I cannot say why as I don't use vB either.

    You may have better luck on the Design forum with this. Development is more for 'how do I fix this in the code' while you appear to have more of a 'how do I fix this in the CMS' question.
    Ah ok, thank you very much for your help and advice. I will ask Micro to move this to the Design forum.

    Thanks again :)


  • Moderators, Category Moderators, Technology & Internet Moderators Posts: 6,265 CMod ✭✭✭✭MiCr0


    moved at user request


  • Registered Users Posts: 324 ✭✭iPaddyM


    MiCr0 wrote: »
    moved at user request

    Thanks MiCr0.

    Could someone offer some insight into this issue please?


  • Advertisement
  • Registered Users Posts: 1,275 ✭✭✭bpmurray


    If it's VB, have you tried
    Imports System.Web
    ...
    fixedText = HttpUtility.HtmlDecode(RSSString)
    


  • Registered Users Posts: 324 ✭✭iPaddyM


    bpmurray wrote: »
    If it's VB, have you tried
    Imports System.Web
    ...
    fixedText = HttpUtility.HtmlDecode(RSSString)
    

    Hi,

    Thanks for your help but tbh, I've no idea what to do with that or where to put it. Here's more information that I have gathered into the issue I'm having. Apparently iconv & mbstring are enabled on the server I'm on. I've gone into phpmyadmin and my vBulletin database is latin1_swedish_ci

    I've changed two tables (post & thread) to utf8_general_ci but I still have the same issue.

    Where can I go from here? :o:confused:


  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    iPaddyM wrote: »
    Where can I go from here? :o:confused:

    Did you try vBulletin support?


  • Registered Users Posts: 324 ✭✭iPaddyM


    Graham wrote: »
    Did you try vBulletin support?

    Yes. Here & here.


  • Registered Users Posts: 324 ✭✭iPaddyM




Advertisement