From dfa2501928e46f2182c5a8d72b40d84fa92b4121 Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Tue, 3 Oct 2017 12:37:23 -0400 Subject: [PATCH] Removed option for SUPPORT_ASIAN_ENCODINGS, and regen'd strings. --- CMakeLists.txt | 1 - console/tidy.c | 5 ----- include/tidyenum.h | 11 ----------- include/tidyplatform.h | 5 ----- localize/translations/language_en_gb.po | 2 +- localize/translations/language_es.po | 2 +- localize/translations/language_es_mx.po | 2 +- localize/translations/language_fr.po | 2 +- localize/translations/language_pt_br.po | 2 +- localize/translations/language_zh_cn.po | 2 +- localize/translations/tidy.pot | 2 +- src/config.c | 11 ----------- src/language_en.h | 4 ---- src/language_en_gb.h | 4 ++-- src/language_es.h | 8 ++------ src/language_es_mx.h | 4 ++-- src/language_fr.h | 10 +--------- src/language_pt_br.h | 14 +++----------- src/language_zh_cn.h | 2 +- src/lexer.c | 5 ++--- src/pprint.c | 20 -------------------- src/pprint.h | 2 +- src/streamio.c | 11 ----------- src/streamio.h | 10 ---------- 24 files changed, 21 insertions(+), 120 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 509372c..a7fda78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,7 +228,6 @@ endif () # Macro Values # These additional macros are set in Tidy's source code. #------------------------------------------------------------------------ -add_definitions ( -DSUPPORT_ASIAN_ENCODINGS=1 ) add_definitions ( -DSUPPORT_ACCESSIBILITY_CHECKS=1 ) add_definitions ( -DLIBTIDY_VERSION="${LIBTIDY_VERSION}" ) add_definitions ( -DRELEASE_DATE="${tidy_YEAR}/${tidy_MONTH}/${tidy_DAY}" ) diff --git a/console/tidy.c b/console/tidy.c index 846b0ac..aeccf4e 100644 --- a/console/tidy.c +++ b/console/tidy.c @@ -379,10 +379,8 @@ static const CmdOptDesc cmdopt_defs[] = { { CmdOptCharEnc, "-utf16le", TC_OPT_UTF16LE, 0, NULL }, { CmdOptCharEnc, "-utf16be", TC_OPT_UTF16BE, 0, NULL }, { CmdOptCharEnc, "-utf16", TC_OPT_UTF16, 0, NULL }, -#if SUPPORT_ASIAN_ENCODINGS /* #431953 - RJ */ { CmdOptCharEnc, "-big5", TC_OPT_BIG5, 0, NULL }, { CmdOptCharEnc, "-shiftjis", TC_OPT_SHIFTJIS, 0, NULL }, -#endif { CmdOptMisc, "-version", TC_OPT_VERSION, 0, NULL, "-v" }, { CmdOptMisc, "-help", TC_OPT_HELP, 0, NULL, "-h", "-?" }, { CmdOptMisc, "-help-config", TC_OPT_HELPCFG, 0, NULL }, @@ -2145,11 +2143,8 @@ int main( int argc, char** argv ) strcasecmp(arg, "utf16le") == 0 || strcasecmp(arg, "utf16be") == 0 || strcasecmp(arg, "utf16") == 0 || - -#if SUPPORT_ASIAN_ENCODINGS strcasecmp(arg, "shiftjis") == 0 || strcasecmp(arg, "big5") == 0 || -#endif strcasecmp(arg, "mac") == 0 || strcasecmp(arg, "win1252") == 0 || strcasecmp(arg, "ibm858") == 0 ) diff --git a/include/tidyenum.h b/include/tidyenum.h index 5e50aa9..8d41dcd 100644 --- a/include/tidyenum.h +++ b/include/tidyenum.h @@ -603,11 +603,7 @@ typedef enum TidyMergeEmphasis, /**< Merge nested B and I elements */ TidyMergeSpans, /**< Merge multiple SPANs */ TidyMetaCharset, /**< Adds/checks/fixes meta charset in the head, based on document type */ -#if SUPPORT_ASIAN_ENCODINGS TidyNCR, /**< Allow numeric character references */ -#else - TidyNCRNotUsed, /**< This option is not compiled in */ -#endif TidyNewline, /**< Output line ending (default to platform) */ TidyNumEntities, /**< Use numeric entities */ TidyOmitOptionalTags, /**< Suppress optional start tags and end tags */ @@ -618,11 +614,7 @@ typedef enum TidyPreserveEntities, /**< Preserve entities */ TidyPreTags, /**< Declared pre tags */ TidyPriorityAttributes, /**< Attributes to place first in an element */ -#if SUPPORT_ASIAN_ENCODINGS TidyPunctWrap, /**< consider punctuation and breaking spaces for wrapping */ -#else - TidyPunctWrapNotUsed, /**< This option is not compiled in */ -#endif TidyQuiet, /**< No 'Parsing X', guessed DTD or summary */ TidyQuoteAmpersand, /**< Output naked ampersand as & */ TidyQuoteMarks, /**< Output " marks as " */ @@ -755,11 +747,8 @@ typedef enum TidyEncUtf16le, TidyEncUtf16be, TidyEncUtf16, - -#if SUPPORT_ASIAN_ENCODINGS TidyEncBig5, TidyEncShiftjis -#endif } TidyEncodingOptions; diff --git a/include/tidyplatform.h b/include/tidyplatform.h index 3bd6f13..707cb6e 100644 --- a/include/tidyplatform.h +++ b/include/tidyplatform.h @@ -77,11 +77,6 @@ extern "C" { * Optional Tidy features support *===========================================================================*/ -/* Enable/disable support for Big5 and Shift_JIS character encodings */ -#ifndef SUPPORT_ASIAN_ENCODINGS -# define SUPPORT_ASIAN_ENCODINGS 1 -#endif - /* Enable/disable support for additional accessibility checks */ #ifndef SUPPORT_ACCESSIBILITY_CHECKS # define SUPPORT_ACCESSIBILITY_CHECKS 1 diff --git a/localize/translations/language_en_gb.po b/localize/translations/language_en_gb.po index 1ec3602..1a09f12 100644 --- a/localize/translations/language_en_gb.po +++ b/localize/translations/language_en_gb.po @@ -5,7 +5,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: HTML Tidy poconvert.rb\n" "Project-Id-Version: \n" -"PO-Revision-Date: 2017-10-03 12:22:47\n" +"PO-Revision-Date: 2017-10-03 12:37:01\n" "Last-Translator: jderry\n" "Language-Team: \n" diff --git a/localize/translations/language_es.po b/localize/translations/language_es.po index 3e35bbe..b152ea4 100644 --- a/localize/translations/language_es.po +++ b/localize/translations/language_es.po @@ -5,7 +5,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: HTML Tidy poconvert.rb\n" "Project-Id-Version: \n" -"PO-Revision-Date: 2017-10-03 12:22:47\n" +"PO-Revision-Date: 2017-10-03 12:37:01\n" "Last-Translator: jderry\n" "Language-Team: \n" diff --git a/localize/translations/language_es_mx.po b/localize/translations/language_es_mx.po index f5db37e..1dce7ce 100644 --- a/localize/translations/language_es_mx.po +++ b/localize/translations/language_es_mx.po @@ -5,7 +5,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: HTML Tidy poconvert.rb\n" "Project-Id-Version: \n" -"PO-Revision-Date: 2017-10-03 12:22:47\n" +"PO-Revision-Date: 2017-10-03 12:37:01\n" "Last-Translator: jderry\n" "Language-Team: \n" diff --git a/localize/translations/language_fr.po b/localize/translations/language_fr.po index 1c6d714..f061857 100644 --- a/localize/translations/language_fr.po +++ b/localize/translations/language_fr.po @@ -5,7 +5,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: HTML Tidy poconvert.rb\n" "Project-Id-Version: \n" -"PO-Revision-Date: 2017-10-03 12:22:47\n" +"PO-Revision-Date: 2017-10-03 12:37:01\n" "Last-Translator: jderry\n" "Language-Team: \n" diff --git a/localize/translations/language_pt_br.po b/localize/translations/language_pt_br.po index 845e919..2cc3a89 100644 --- a/localize/translations/language_pt_br.po +++ b/localize/translations/language_pt_br.po @@ -5,7 +5,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: HTML Tidy poconvert.rb\n" "Project-Id-Version: \n" -"PO-Revision-Date: 2017-10-03 12:22:47\n" +"PO-Revision-Date: 2017-10-03 12:37:01\n" "Last-Translator: jderry\n" "Language-Team: \n" diff --git a/localize/translations/language_zh_cn.po b/localize/translations/language_zh_cn.po index a68c3ef..47fc76a 100644 --- a/localize/translations/language_zh_cn.po +++ b/localize/translations/language_zh_cn.po @@ -5,7 +5,7 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: HTML Tidy poconvert.rb\n" "Project-Id-Version: \n" -"PO-Revision-Date: 2017-10-03 12:22:47\n" +"PO-Revision-Date: 2017-10-03 12:37:01\n" "Last-Translator: jderry\n" "Language-Team: \n" diff --git a/localize/translations/tidy.pot b/localize/translations/tidy.pot index 185f2f1..130a797 100644 --- a/localize/translations/tidy.pot +++ b/localize/translations/tidy.pot @@ -5,7 +5,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: HTML Tidy poconvert.rb\n" "Project-Id-Version: \n" -"POT-Creation-Date: 2017-10-03 12:22:47\n" +"POT-Creation-Date: 2017-10-03 12:37:01\n" "Last-Translator: jderry\n" "Language-Team: \n" diff --git a/src/config.c b/src/config.c index 9b506e2..804d64e 100644 --- a/src/config.c +++ b/src/config.c @@ -94,12 +94,8 @@ static PickListItems charEncPicks = { { "utf16le", TidyEncUtf16le, { "utf16le", NULL } }, { "utf16be", TidyEncUtf16be, { "utf16be", NULL } }, { "utf16", TidyEncUtf16, { "utf16", NULL } }, - -#if SUPPORT_ASIAN_ENCODINGS { "big5", TidyEncBig5, { "big5", NULL } }, { "shiftjis", TidyEncShiftjis, { "shiftjis", NULL } }, -#endif - { NULL } }; @@ -263,9 +259,7 @@ static const TidyOptionImpl option_defs[] = { TidyMergeEmphasis, MU, "merge-emphasis", BL, yes, ParsePickList, &boolPicks }, { TidyMergeSpans, MU, "merge-spans", IN, TidyAutoState, ParsePickList, &autoBoolPicks }, { TidyMetaCharset, MS, "add-meta-charset", BL, no, ParsePickList, &boolPicks }, /* 20161004 - Issue #456 */ -#if SUPPORT_ASIAN_ENCODINGS { TidyNCR, MU, "ncr", BL, yes, ParsePickList, &boolPicks }, -#endif { TidyNewline, CE, "newline", IN, DLF, ParsePickList, &newlinePicks }, { TidyNumEntities, MU, "numeric-entities", BL, no, ParsePickList, &boolPicks }, { TidyOmitOptionalTags, MU, "omit-optional-tags", BL, no, ParsePickList, &boolPicks }, @@ -276,9 +270,7 @@ static const TidyOptionImpl option_defs[] = { TidyPreserveEntities, MU, "preserve-entities", BL, no, ParsePickList, &boolPicks }, { TidyPreTags, MU, "new-pre-tags", ST, 0, ParseTagNames, NULL }, { TidyPriorityAttributes, MU, "priority-attributes", ST, 0, ParseList, NULL }, -#if SUPPORT_ASIAN_ENCODINGS { TidyPunctWrap, PP, "punctuation-wrap", BL, no, ParsePickList, &boolPicks }, -#endif { TidyQuiet, MS, "quiet", BL, no, ParsePickList, &boolPicks }, { TidyQuoteAmpersand, MU, "quote-ampersand", BL, yes, ParsePickList, &boolPicks }, { TidyQuoteMarks, MU, "quote-marks", BL, no, ParsePickList, &boolPicks }, @@ -995,11 +987,8 @@ Bool TY_(AdjustCharEncoding)( TidyDocImpl* doc, int encoding ) case UTF16LE: case UTF16BE: case UTF16: - -#if SUPPORT_ASIAN_ENCODINGS case SHIFTJIS: case BIG5: -#endif inenc = outenc = encoding; break; } diff --git a/src/language_en.h b/src/language_en.h index 1970126..b3e970e 100644 --- a/src/language_en.h +++ b/src/language_en.h @@ -835,7 +835,6 @@ static languageDefinition language_en = { whichPluralForm_en, { "
" "The algorithm is identical to the one used by merge-divs. " }, -#if SUPPORT_ASIAN_ENCODINGS {/* Important notes for translators: - Use only , , , , and
. @@ -847,7 +846,6 @@ static languageDefinition language_en = { whichPluralForm_en, { TidyNCR, 0, "This option specifies if Tidy should allow numeric character references. " }, -#endif {/* Important notes for translators: - Use only , , , , and
. @@ -1024,7 +1022,6 @@ static languageDefinition language_en = { whichPluralForm_en, { "
" "This option takes a space or comma separated list of attribute names. " }, -#if SUPPORT_ASIAN_ENCODINGS {/* Important notes for translators: - Use only , , , , and
. @@ -1037,7 +1034,6 @@ static languageDefinition language_en = { whichPluralForm_en, { "This option specifies if Tidy should line wrap after some Unicode or " "Chinese punctuation characters. " }, -#endif {/* Important notes for translators: - Use only , , , , and
. diff --git a/src/language_en_gb.h b/src/language_en_gb.h index c4bd5ea..5c2287f 100644 --- a/src/language_en_gb.h +++ b/src/language_en_gb.h @@ -1,4 +1,4 @@ -#ifndef language_en_gb_h +#ifndef language_en_gb_h #define language_en_gb_h /* * language_en_gb.h @@ -28,7 +28,7 @@ * * Orginating PO file metadata: * PO_LAST_TRANSLATOR=jderry - * PO_REVISION_DATE=2017-08-28 10:04:30 + * PO_REVISION_DATE=2017-10-03 12:37:01 */ #ifdef _MSC_VER diff --git a/src/language_es.h b/src/language_es.h index 7e7e193..4792385 100644 --- a/src/language_es.h +++ b/src/language_es.h @@ -1,4 +1,4 @@ -#ifndef language_es_h +#ifndef language_es_h #define language_es_h /* * language_es.h @@ -28,7 +28,7 @@ * * Orginating PO file metadata: * PO_LAST_TRANSLATOR=jderry - * PO_REVISION_DATE=2017-05-13 21:04:45 + * PO_REVISION_DATE=2017-10-03 12:37:01 */ #ifdef _MSC_VER @@ -68,11 +68,7 @@ static languageDefinition language_es = { whichPluralForm_es, { "code>). Si se establece en yes, entonces etiquetas existentes serán reemplazados " "con CSS <style> y estructural markup según corresponda. " }, - -#if SUPPORT_ASIAN_ENCODINGS { TidyNCR, 0, "Esta opción especifica si Tidy debe permitir referencias de caracteres numéricos. " }, -#endif /* SUPPORT_ASIAN_ENCODINGS */ - { TEXT_GENERAL_INFO_PLEA, 0, "\n" "¿Le gustaría ver Tidy en un español correcto? Por favor considere \n" diff --git a/src/language_es_mx.h b/src/language_es_mx.h index 4c12b71..40c3f96 100644 --- a/src/language_es_mx.h +++ b/src/language_es_mx.h @@ -1,4 +1,4 @@ -#ifndef language_es_mx_h +#ifndef language_es_mx_h #define language_es_mx_h /* * language_es_mx.h @@ -28,7 +28,7 @@ * * Orginating PO file metadata: * PO_LAST_TRANSLATOR=jderry - * PO_REVISION_DATE=2017-05-13 21:04:45 + * PO_REVISION_DATE=2017-10-03 12:37:01 */ #ifdef _MSC_VER diff --git a/src/language_fr.h b/src/language_fr.h index 886b458..19e091c 100644 --- a/src/language_fr.h +++ b/src/language_fr.h @@ -28,7 +28,7 @@ * * Orginating PO file metadata: * PO_LAST_TRANSLATOR=jderry - * PO_REVISION_DATE=2017-10-03 12:22:47 + * PO_REVISION_DATE=2017-10-03 12:37:01 */ #ifdef _MSC_VER @@ -319,11 +319,7 @@ static languageDefinition language_fr = { whichPluralForm_fr, { "imbriqués, comme suit : <span><span>...</span></span>.
L'algorithme est le même que celui de merge-divs. " }, - -#if SUPPORT_ASIAN_ENCODINGS { TidyNCR, 0, "Cette option précise si Tidy doit autoriser les références numériques de caractères. " }, -#endif /* SUPPORT_ASIAN_ENCODINGS */ - { TidyNewline, 0, "La valeur par défaut est appropriée à la plateforme d'exécution de Tidy.
Généralement " "CRLF sur PC-DOS, Windows et OS/2; CR sur Classic Mac OS; et LF " @@ -381,14 +377,10 @@ static languageDefinition language_fr = { whichPluralForm_fr, { "inconnues.
Notez que vous ne pouvez encore ajouter de nouveaux éléments CDATA.
Cette " "option est ignorée avec le mode XML. " }, - -#if SUPPORT_ASIAN_ENCODINGS { TidyPunctWrap, 0, "Cette option précise si Tidy doit passer à la ligne après certains caractères de ponctuation " "Unicode ou chinois." }, -#endif /* SUPPORT_ASIAN_ENCODINGS */ - { TidyQuiet, 0, "Cette option précise si Tidy doit afficher le résumé du nombre des erreurs et avertissements, ou " "les messages de bienvenue et d'information." diff --git a/src/language_pt_br.h b/src/language_pt_br.h index 0dd7828..c0ce050 100644 --- a/src/language_pt_br.h +++ b/src/language_pt_br.h @@ -1,4 +1,4 @@ -#ifndef language_pt_br_h +#ifndef language_pt_br_h #define language_pt_br_h /* * language_pt_br.h @@ -27,8 +27,8 @@ * Template Created by Jim Derry on 01/14/2016. * * Orginating PO file metadata: - * PO_LAST_TRANSLATOR=Rafael Fontenelle - * PO_REVISION_DATE=2017-09-21 00:07-0200 + * PO_LAST_TRANSLATOR=jderry + * PO_REVISION_DATE=2017-10-03 12:37:01 */ #ifdef _MSC_VER @@ -361,14 +361,10 @@ static languageDefinition language_pt_br = { whichPluralForm_pt_br, { "<span><span>...</span></span>.
O " "algoritmo é idêntico àquele usado por merge-divs. " }, - -#if SUPPORT_ASIAN_ENCODINGS { TidyNCR, 0, "Esta opção especifica se o Tidy deve permitir referências de caracteres " "numéricos. " }, -#endif /* SUPPORT_ASIAN_ENCODINGS */ - { TidyNewline, 0, "O padrão é apropriado para a plataforma atual.
Geralmente, CRLF no PC-" "DOS, Windows e OS/2; CR no Mac OS Clássico; e LF nos demais (Linux, Mac OS X " @@ -436,14 +432,10 @@ static languageDefinition language_pt_br = { whichPluralForm_pt_br, { "que você ainda não pode adicionar novos elementos CDATA.
Esta opção é " "ignorada no modo XML. " }, - -#if SUPPORT_ASIAN_ENCODINGS { TidyPunctWrap, 0, "Essa opção especifica se o Tidy deve quebrar linha após alguns Unicode ou " "caracteres de pontuação chineses. " }, -#endif /* SUPPORT_ASIAN_ENCODINGS */ - { TidyQuiet, 0, "Essa opção especifica se o Tidy deve emitir o resumo dos números de erros e " "avisos, ou as mensagens de boas-vidas ou informacionais. " diff --git a/src/language_zh_cn.h b/src/language_zh_cn.h index f4726d3..28bb5ce 100644 --- a/src/language_zh_cn.h +++ b/src/language_zh_cn.h @@ -28,7 +28,7 @@ * * Orginating PO file metadata: * PO_LAST_TRANSLATOR=jderry - * PO_REVISION_DATE=2017-10-03 12:22:47 + * PO_REVISION_DATE=2017-10-03 12:37:01 */ #ifdef _MSC_VER diff --git a/src/lexer.c b/src/lexer.c index aea7619..447a8f0 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -1215,15 +1215,14 @@ static void ParseEntity( TidyDocImpl* doc, GetTokenMode mode ) if (charRead == 1 && c == '#') { -#if SUPPORT_ASIAN_ENCODINGS - if ( !cfgBool(doc, TidyNCR) || + if ( !cfgBool(doc, TidyNCR) || cfg(doc, TidyInCharEncoding) == BIG5 || cfg(doc, TidyInCharEncoding) == SHIFTJIS ) { TY_(UngetChar)('#', doc->docIn); return; } -#endif + TY_(AddCharToLexer)( lexer, c ); entState = ENT_numdec; continue; diff --git a/src/pprint.c b/src/pprint.c index c4803c4..36d7c3f 100644 --- a/src/pprint.c +++ b/src/pprint.c @@ -69,7 +69,6 @@ void TY_(PPrintSpaces)(void) indent_char = ' '; } -#if SUPPORT_ASIAN_ENCODINGS /* #431953 - start RJ Wraplen adjusted for smooth international ride */ typedef enum @@ -287,7 +286,6 @@ static WrapPoint Big5WrapPoint(tchar c) return NoWrapPoint; } -#endif /* SUPPORT_ASIAN_ENCODINGS */ static void InitIndent( TidyIndent* ind ) { @@ -888,8 +886,6 @@ static void PPrintChar( TidyDocImpl* doc, uint c, uint mode ) } } -#if SUPPORT_ASIAN_ENCODINGS - /* #431953 - start RJ */ /* Handle encoding-specific issues */ switch ( outenc ) @@ -930,22 +926,6 @@ static void PPrintChar( TidyDocImpl* doc, uint c, uint mode ) AddChar( pprint, c ); return; } - /* #431953 - end RJ */ - -#else /* SUPPORT_ASIAN_ENCODINGS */ - - /* otherwise ISO 2022 characters are passed raw */ - if ( -#ifndef NO_NATIVE_ISO2022_SUPPORT - outenc == ISO2022 || -#endif - outenc == RAW ) - { - AddChar( pprint, c ); - return; - } - -#endif /* SUPPORT_ASIAN_ENCODINGS */ /* don't map latin-1 chars to entities */ if ( outenc == LATIN1 ) diff --git a/src/pprint.h b/src/pprint.h index 8d473a4..ec5255b 100644 --- a/src/pprint.h +++ b/src/pprint.h @@ -60,7 +60,7 @@ typedef struct _TidyPrintImpl } TidyPrintImpl; -#if 0 && SUPPORT_ASIAN_ENCODINGS +#if 0 /* #431953 - start RJ Wraplen adjusted for smooth international ride */ uint CWrapLen( TidyDocImpl* doc, uint ind ); #endif diff --git a/src/streamio.c b/src/streamio.c index eb63c71..0acca02 100644 --- a/src/streamio.c +++ b/src/streamio.c @@ -395,11 +395,8 @@ uint TY_(ReadChar)( StreamIn *in ) || in->encoding == ISO2022 #endif || in->encoding == UTF8 - -#if SUPPORT_ASIAN_ENCODINGS || in->encoding == SHIFTJIS /* #431953 - RJ */ || in->encoding == BIG5 /* #431953 - RJ */ -#endif ) { in->curcol++; @@ -710,8 +707,6 @@ void TY_(WriteChar)( uint c, StreamOut* out ) } } } - -#if SUPPORT_ASIAN_ENCODINGS else if (out->encoding == BIG5 || out->encoding == SHIFTJIS) { if (c < 128) @@ -722,8 +717,6 @@ void TY_(WriteChar)( uint c, StreamOut* out ) ch = c & 0xFF; PutByte(ch, out); } } -#endif - else PutByte( c, out ); } @@ -1243,7 +1236,6 @@ static uint ReadCharFromStream( StreamIn* in ) return n; } -#if SUPPORT_ASIAN_ENCODINGS /* This section is suitable for any "multibyte" variable-width character encoding in which a one-byte code is less than @@ -1273,7 +1265,6 @@ static uint ReadCharFromStream( StreamIn* in ) return n; } } -#endif #ifdef TIDY_WIN32_MLANG_SUPPORT else if (in->encoding > WIN32MLANG) @@ -1322,10 +1313,8 @@ static struct _enc2iana { UTF16LE, "utf-16", "utf16le" }, { UTF16BE, "utf-16", "utf16be" }, { UTF16, "utf-16", "utf16" }, -#if SUPPORT_ASIAN_ENCODINGS { BIG5, "big5", "big5" }, { SHIFTJIS, "shift_jis", "shiftjis"}, -#endif #ifndef NO_NATIVE_ISO2022_SUPPORT { ISO2022, NULL, "iso2022" }, #endif diff --git a/src/streamio.h b/src/streamio.h index 280f699..93b0ee3 100644 --- a/src/streamio.h +++ b/src/streamio.h @@ -157,18 +157,8 @@ int TY_(GetCharEncodingFromOptName)(ctmbstr charenc); #define UTF16LE 9 #define UTF16BE 10 #define UTF16 11 - -/* Note that Big5 and SHIFTJIS are not converted to ISO 10646 codepoints -** (i.e., to Unicode) before being recoded into UTF-8. This may be -** confusing: usually UTF-8 implies ISO10646 codepoints. -*/ -#if SUPPORT_ASIAN_ENCODINGS #define BIG5 12 #define SHIFTJIS 13 -#else -#define BIG5 9 -#define SHIFTJIS 10 -#endif #ifdef TIDY_WIN32_MLANG_SUPPORT /* hack: windows code page numbers start at 37 */