diff options
author | Andrew Sidwell <andy@entai.co.uk> | 2008-08-11 01:29:00 +0000 |
---|---|---|
committer | Andrew Sidwell <andy@entai.co.uk> | 2008-08-11 01:29:00 +0000 |
commit | a6c3624c75a547e142fc732898f9a3890fa9e2f5 (patch) | |
tree | 6e1b44c51a706843d2057e3e1126ffa5714becf1 /src/treebuilder | |
parent | 4aef3c775e93d5add0277941fe0ecccc91d4ccb3 (diff) | |
download | libhubbub-a6c3624c75a547e142fc732898f9a3890fa9e2f5.tar.gz libhubbub-a6c3624c75a547e142fc732898f9a3890fa9e2f5.tar.bz2 |
Move one step closer to getting encoding changes working.
svn path=/trunk/hubbub/; revision=5000
Diffstat (limited to 'src/treebuilder')
-rw-r--r-- | src/treebuilder/in_head.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/treebuilder/in_head.c b/src/treebuilder/in_head.c index 88fcff5..897610b 100644 --- a/src/treebuilder/in_head.c +++ b/src/treebuilder/in_head.c @@ -64,20 +64,26 @@ static hubbub_error process_meta_in_head(hubbub_treebuilder *treebuilder, if (treebuilder->tree_handler->encoding_change) { const char *name = parserutils_charset_mibenum_to_name( charset_enc); - treebuilder->tree_handler->encoding_change( + + /* 1 indicates the encoding should actually change */ + if (treebuilder->tree_handler->encoding_change( treebuilder->tree_handler->ctx, - name); + name) == 1) { + return HUBBUB_ENCODINGCHANGE; + } } - return HUBBUB_ENCODINGCHANGE; } else if (content_type_enc != 0) { if (treebuilder->tree_handler->encoding_change) { const char *name = parserutils_charset_mibenum_to_name( content_type_enc); - treebuilder->tree_handler->encoding_change( + + /* 1 indicates the encoding should actually change */ + if (treebuilder->tree_handler->encoding_change( treebuilder->tree_handler->ctx, - name); + name) == 1) { + return HUBBUB_ENCODINGCHANGE; + } } - return HUBBUB_ENCODINGCHANGE; } return HUBBUB_OK; |