Results 1 to 4 of 4
  1. #1
    uthpalaw is offline Member
    Join Date
    Mar 2010
    Posts
    68
    Rep Power
    0

    Default rss reader not supporting special characters

    Hi, some special characters are not supported by the rss readers(Im using feedreader 3.14), like <(less than) , > (greater than), ; (colon)., can someone help me with this.

    Thanks.

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default

    Well Do you have app. which sent rss data or do you have problems only with feedreader 3.14?
    Skype: petrarsentev
    http://TrackStudio.com

  3. #3
    uthpalaw is offline Member
    Join Date
    Mar 2010
    Posts
    68
    Rep Power
    0

    Default

    yes., i have a web app which is sending rss datas, once i uploaded some of these characters they r not visible in the rss reader( i haven't used any other rss readers)

  4. #4
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default

    I had the same task and I found solve use follows code, It is escaping not valid character for xml.
    Java Code:
        public static String stripNonValidXMLCharacters(String in) {
            StringBuffer out = new StringBuffer(); // Used to hold the output.
            char current; // Used to reference the current character.
    
            if (in == null || ("".equals(in))) return ""; // vacancy test.
            for (int i = 0; i < in.length(); i++) {
                current = in.charAt(i); // NOTE: No IndexOutOfBoundsException caught here; it should not happen.
                if ((current == 0x9) ||
                        (current == 0xA) ||
                        (current == 0xD) ||
                        ((current >= 0x20) && (current <= 0xD7FF)) ||
                        ((current >= 0xE000) && (current <= 0xFFFD)) ||
                        ((current >= 0x10000) && (current <= 0x10FFFF)))
                    out.append(current);
            }
            return out.toString();
        }
    Skype: petrarsentev
    http://TrackStudio.com

Similar Threads

  1. Help - special characters producing 404 errors
    By Knedlikova in forum New To Java
    Replies: 3
    Last Post: 11-17-2010, 09:13 AM
  2. XML with special characters
    By Kaizah in forum XML
    Replies: 1
    Last Post: 11-06-2009, 02:26 PM
  3. [SOLVED] special characters (ASCII)
    By AlejandroPe in forum New To Java
    Replies: 8
    Last Post: 04-06-2009, 10:42 AM
  4. Searching for Microsoft special characters
    By Tim McDaniel in forum Eclipse
    Replies: 2
    Last Post: 02-24-2009, 03:11 PM
  5. special characters
    By ravian in forum New To Java
    Replies: 2
    Last Post: 11-16-2007, 01:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •