sboag       00/10/12 13:48:12

  Modified:    src/org/apache/xalan/xpath/xml FormatterToHTML.java
  Log:
  Don't escape certain entities when using wide character set.
  
  Revision  Changes    Path
  1.36      +12 -1     
xml-xalan/src/org/apache/xalan/xpath/xml/FormatterToHTML.java
  
  Index: FormatterToHTML.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/src/org/apache/xalan/xpath/xml/FormatterToHTML.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- FormatterToHTML.java      2000/08/09 01:43:56     1.35
  +++ FormatterToHTML.java      2000/10/12 20:48:09     1.36
  @@ -759,7 +759,14 @@
             accum("&#x");
             accum(Integer.toString((int)ch, 16));
             accum(";");*/
  -        }        
  +        }  
  +        // The next is kind of a hack to keep from escaping in the case 
  +        // of Shift_JIS and the like.
  +        else if((ch < m_maxCharacter) && (m_maxCharacter == 0xFFFF) &&
  +                (ch != 160) /* nbsp */ )
  +        {
  +          accum(ch); // no escaping in this case
  +        }
           else if((ch >= 160) && (ch <= 255))
           {
             accum('&');
  @@ -795,6 +802,10 @@
           else if (402 == ch) 
           {
             accum("&fnof;");
  +        }
  +        else if(ch < m_maxCharacter)
  +        {
  +          accum(ch); // no escaping in this case
           }
           else
           {
  
  
  

Reply via email to