Menu

Special Character

Help
2005-01-31
2013-04-27
  • javacodeforger

    javacodeforger - 2005-01-31

    I noticed when there are special character in the tag content like:

    <a href="http://www.somelink.com"> 
      special characters like arabic words
    </a>

    & i do a

    htmlNode.collectInto(titlelist,nodeFilter);

    where nodeFilter = new TagNameFilter("a");

    i will get the tag
    <a href="http://www.somelink.com"> 
    </a>

    but with no content

    hence an error when i try to retrieve the childNodes

    is there anyway around this?

     
    • Derrick Oswald

      Derrick Oswald - 2005-01-31

      You can try setting the character set before parsing:
         parser.setEncoding ("<arabic_character_set>");
      and see if that helps.

       
    • javacodeforger

      javacodeforger - 2005-02-02

      Hi Derrick,

      I'm parsing a page that may contain more than one language. So I can't set the encoding to some other character set.

      Btw does anyone know why this happens?

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.