Revision: 5790 http://geany.svn.sourceforge.net/geany/?rev=5790&view=rev Author: colombanw Date: 2011-05-09 17:40:16 +0000 (Mon, 09 May 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: -------------- branches/0.20.1/ChangeLog branches/0.20.1/src/encodings.c
Modified: branches/0.20.1/ChangeLog =================================================================== --- branches/0.20.1/ChangeLog 2011-05-09 17:39:57 UTC (rev 5789) +++ branches/0.20.1/ChangeLog 2011-05-09 17:40:16 UTC (rev 5790) @@ -28,6 +28,9 @@ Fix a few Doxygen warnings. * plugins/saveactions.c: Properly use 0 as the invalid timeout source ID. + * 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-05-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: branches/0.20.1/src/encodings.c =================================================================== --- branches/0.20.1/src/encodings.c 2011-05-09 17:39:57 UTC (rev 5789) +++ branches/0.20.1/src/encodings.c 2011-05-09 17:40:16 UTC (rev 5790) @@ -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.