Does the SaxParser detect xml encoding?
问题 I have an html file that contains these tags at the top: <?xml version="1.0" encoding="windows-1252"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml:lang="fi" lang="fi" xmlns="http://www.w3.org/1999/xhtml"> <head> An exception is occuring when i try to use a SaxParser to parse the Html file saying that some character at a specified line and column is invalid when i use this code: SAXParserFactory factory =