+// This class is used to parse HTML entities in strings. It can handle
+// both named entities and &#xxxx entries where xxxx is Unicode code.
+class WXDLLEXPORT wxHtmlEntitiesParser : public wxObject
+{
+ DECLARE_DYNAMIC_CLASS(wxHtmlEntitiesParser)
+
+public:
+ wxHtmlEntitiesParser();
+ virtual ~wxHtmlEntitiesParser();
+
+ // Sets encoding of output string.
+ // Has no effect if wxUSE_WCHAR_T==0 or wxUSE_UNICODE==1
+ void SetEncoding(wxFontEncoding encoding);
+
+ // Parses entities in input and replaces them with respective characters
+ // (with respect to output encoding)
+ wxString Parse(const wxString& input);
+
+ // Returns character for given entity
+ wxChar GetEntityChar(const wxString& entity);
+
+ // Returns character that represents given Unicode code
+ wxChar GetCharForCode(unsigned code);
+
+protected:
+#if wxUSE_WCHAR_T && !wxUSE_UNICODE
+ wxMBConv *m_conv;
+ wxFontEncoding m_encoding;
+#endif
+};