Revision: 5664 http://geany.svn.sourceforge.net/geany/?rev=5664&view=rev Author: colombanw Date: 2011-03-31 23:27:33 +0000 (Thu, 31 Mar 2011)
Log Message: ----------- Update regex for encoding detection to match quoted names
This allows encoding="utf8", adding support for XML encoding detection.
Closes #3183506.
Modified Paths: -------------- trunk/ChangeLog trunk/src/encodings.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-03-31 17:58:01 UTC (rev 5663) +++ trunk/ChangeLog 2011-03-31 23:27:33 UTC (rev 5664) @@ -1,3 +1,10 @@ +2011-04-01 Colomban Wendling <colomban(at)geany(dot)org> + + * src/encodings.c: + Update regex used to find encodings for it to allow the encoding to + be quoted, adding support for XML (closes #3183506). + + 2011-03-31 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* plugins/filebrowser.c:
Modified: trunk/src/encodings.c =================================================================== --- trunk/src/encodings.c 2011-03-31 17:58:01 UTC (rev 5663) +++ trunk/src/encodings.c 2011-03-31 23:27:33 UTC (rev 5664) @@ -53,7 +53,7 @@ /* <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> */ #define PATTERN_HTMLMETA "<meta[ \t\n\r\f]http-equiv[ \t\n\r\f]*=[ \t\n\r\f]*"content-type"[ \t\n\r\f]+content[ \t\n\r\f]*=[ \t\n\r\f]*"text/x?html;[ \t\n\r\f]*charset=([a-z0-9_-]+)"[ \t\n\r\f]*/?>" /* " geany_encoding=utf-8 " or " coding: utf-8 " */ -#define PATTERN_CODING "coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*" +#define PATTERN_CODING "coding[\t ]*[:=][\t ]*"?([a-z0-9-]+)"?[\t ]*"
/* precompiled regexps */ static regex_t pregs[2];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.