]> granicus.if.org Git - php/commitdiff
This commit was manufactured by cvs2svn to create branch 'PHP_4_3'.
authorSVN Migration <svn@php.net>
Sun, 20 Feb 2005 22:20:24 +0000 (22:20 +0000)
committerSVN Migration <svn@php.net>
Sun, 20 Feb 2005 22:20:24 +0000 (22:20 +0000)
ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c [new file with mode: 0755]
ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.h [new file with mode: 0755]
ext/mbstring/libmbfl/filters/mk_sb_tbl.awk [new file with mode: 0755]
ext/mbstring/libmbfl/filters/unicode_table_iso8859_16.h [new file with mode: 0644]
ext/mbstring/libmbfl/libmbfl.sln [new file with mode: 0755]
ext/mbstring/libmbfl/libmbfl.vcproj [new file with mode: 0755]
ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk [new file with mode: 0644]
ext/mbstring/tests/bug31911.phpt [new file with mode: 0644]

diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.c
new file mode 100755 (executable)
index 0000000..8f12feb
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * "streamable kanji code filter and converter"
+ * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved.
+ *
+ * LICENSE NOTICES
+ *
+ * This file is part of "streamable kanji code filter and converter",
+ * which is distributed under the terms of GNU Lesser General Public 
+ * License (version 2) as published by the Free Software Foundation.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with "streamable kanji code filter and converter";
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA  02111-1307  USA
+ *
+ * The author of this file:
+ *
+ */
+/*
+ * The source code included in this files was separated from mbfilter.c
+ * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002.
+ * 
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "mbfilter.h"
+#include "mbfilter_iso8859_16.h"
+#include "unicode_table_iso8859_16.h"
+
+static const char *mbfl_encoding_8859_16_aliases[] = {"ISO_8859-16", NULL};
+
+const mbfl_encoding mbfl_encoding_8859_16 = {
+       mbfl_no_encoding_8859_16,
+       "ISO-8859-16",
+       "ISO-8859-16",
+       (const char *(*)[])&mbfl_encoding_8859_16_aliases,
+       NULL,
+       MBFL_ENCTYPE_SBCS
+};
+
+const struct mbfl_identify_vtbl vtbl_identify_8859_16 = {
+       mbfl_no_encoding_8859_16,
+       mbfl_filt_ident_common_ctor,
+       mbfl_filt_ident_common_dtor,
+       mbfl_filt_ident_true
+};
+
+const struct mbfl_convert_vtbl vtbl_8859_16_wchar = {
+       mbfl_no_encoding_8859_16,
+       mbfl_no_encoding_wchar,
+       mbfl_filt_conv_common_ctor,
+       mbfl_filt_conv_common_dtor,
+       mbfl_filt_conv_8859_16_wchar,
+       mbfl_filt_conv_common_flush
+};
+
+const struct mbfl_convert_vtbl vtbl_wchar_8859_16 = {
+       mbfl_no_encoding_wchar,
+       mbfl_no_encoding_8859_16,
+       mbfl_filt_conv_common_ctor,
+       mbfl_filt_conv_common_dtor,
+       mbfl_filt_conv_wchar_8859_16,
+       mbfl_filt_conv_common_flush
+};
+
+#define CK(statement)  do { if ((statement) < 0) return (-1); } while (0)
+
+/*
+ * ISO-8859-16 => wchar
+ */
+int mbfl_filt_conv_8859_16_wchar(int c, mbfl_convert_filter *filter)
+{
+       int s;
+
+       if (c >= 0 && c < 0xa0) {
+               s = c;
+       } else if (c >= 0xa0 && c < 0x100) {
+               s = iso8859_16_ucs_table[c - 0xa0];
+               if (s <= 0) {
+                       s = c;
+                       s &= MBFL_WCSPLANE_MASK;
+                       s |= MBFL_WCSPLANE_8859_16;
+               }
+       } else {
+               s = c;
+               s &= MBFL_WCSGROUP_MASK;
+               s |= MBFL_WCSGROUP_THROUGH;
+       }
+
+       CK((*filter->output_function)(s, filter->data));
+
+       return c;
+}
+
+/*
+ * wchar => ISO-8859-16
+ */
+int mbfl_filt_conv_wchar_8859_16(int c, mbfl_convert_filter *filter)
+{
+       int s, n;
+
+       if (c >= 0 && c < 0xa0) {
+               s = c;
+       } else {
+               s = -1;
+               n = 95;
+               while (n >= 0) {
+                       if (c == iso8859_16_ucs_table[n]) {
+                               s = 0xa0 + n;
+                               break;
+                       }
+                       n--;
+               }
+               if (s <= 0 && (c & ~MBFL_WCSPLANE_MASK) == MBFL_WCSPLANE_8859_16) {
+                       s = c & MBFL_WCSPLANE_MASK;
+               }
+       }
+
+       if (s >= 0) {
+               CK((*filter->output_function)(s, filter->data));
+       } else {
+               if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
+                       CK(mbfl_filt_conv_illegal_output(c, filter));
+               }
+       }
+
+       return c;
+}
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.h b/ext/mbstring/libmbfl/filters/mbfilter_iso8859_16.h
new file mode 100755 (executable)
index 0000000..a5e2d2f
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * COPYRIGHT NOTICE
+ *
+ * This file is a portion of "streamable kanji code filter and converter"
+ * library, which is distributed under GNU Lesser General Public License
+ * version 2.1.  
+ * 
+ */
+
+#ifndef MBFL_MBFILTER_ISO8859_16_H
+#define MBFL_MBFILTER_ISO8859_16_H
+
+#include "mbfilter.h"
+
+extern const mbfl_encoding mbfl_encoding_8859_16;
+extern const struct mbfl_identify_vtbl vtbl_identify_8859_16;
+extern const struct mbfl_convert_vtbl vtbl_8859_16_wchar;
+extern const struct mbfl_convert_vtbl vtbl_wchar_8859_16;
+
+int mbfl_filt_conv_8859_16_wchar(int c, mbfl_convert_filter *filter);
+int mbfl_filt_conv_wchar_8859_16(int c, mbfl_convert_filter *filter);
+
+#endif /* MBFL_MBFILTER_ISO8859_16_H */
diff --git a/ext/mbstring/libmbfl/filters/mk_sb_tbl.awk b/ext/mbstring/libmbfl/filters/mk_sb_tbl.awk
new file mode 100755 (executable)
index 0000000..ae090b5
--- /dev/null
@@ -0,0 +1,42 @@
+#!/usr/bin/awk -f
+#
+# $Id$
+#
+# Description: a script that generates a single byte code set to Unicode
+# mapping table.
+#
+BEGIN {
+       FS="[ \t#]"
+}
+
+/^#/ {
+       # Do nothing
+}
+
+{
+       tbl[$1 + 0] = $2
+}
+
+END {
+       print "/* This file is automatically generated. Do not edit! */"
+       if (IFNDEF_NAME) {
+               print "#ifndef " IFNDEF_NAME
+       }
+
+       print "static const unsigned int " TABLE_NAME "[] = {"
+       i = 160;
+       for (;;) {
+               printf("\t0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x", tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++]);
+               if (i != 256) {
+                       printf(",\n");
+               } else {
+                       print
+                       break;
+               }
+       }       
+       print "};"
+
+       if (IFNDEF_NAME) {
+               print "#endif /* " IFNDEF_NAME " */"
+       }
+}
diff --git a/ext/mbstring/libmbfl/filters/unicode_table_iso8859_16.h b/ext/mbstring/libmbfl/filters/unicode_table_iso8859_16.h
new file mode 100644 (file)
index 0000000..256865f
--- /dev/null
@@ -0,0 +1,17 @@
+/* This file is automatically generated. Do not edit! */
+#ifndef UNICODE_TABLEISO8859_16_H
+static const unsigned int iso8859_16_ucs_table[] = {
+       0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x201e, 0x0160, 0x00a7,
+       0x0161, 0x00a9, 0x0218, 0x00ab, 0x0179, 0x00ad, 0x017a, 0x017b,
+       0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7,
+       0x017e, 0x010d, 0x0219, 0x00bb, 0x0152, 0x0153, 0x0178, 0x017c,
+       0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0106, 0x00c6, 0x00c7,
+       0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
+       0x0110, 0x0143, 0x00d2, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x015a,
+       0x0170, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0118, 0x021a, 0x00df,
+       0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x0107, 0x00e6, 0x00e7,
+       0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+       0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b,
+       0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff
+};
+#endif /* UNICODE_TABLEISO8859_16_H */
diff --git a/ext/mbstring/libmbfl/libmbfl.sln b/ext/mbstring/libmbfl/libmbfl.sln
new file mode 100755 (executable)
index 0000000..f49f0c0
--- /dev/null
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmbfl", "libmbfl.vcproj", "{B3636594-A785-4270-A765-8EAE922B5207}"
+EndProject
+Global
+       GlobalSection(SolutionConfiguration) = preSolution
+               ConfigName.0 = Debug
+               ConfigName.1 = Release
+       EndGlobalSection
+       GlobalSection(ProjectDependencies) = postSolution
+       EndGlobalSection
+       GlobalSection(ProjectConfiguration) = postSolution
+               {B3636594-A785-4270-A765-8EAE922B5207}.Debug.ActiveCfg = Debug|Win32
+               {B3636594-A785-4270-A765-8EAE922B5207}.Debug.Build.0 = Debug|Win32
+               {B3636594-A785-4270-A765-8EAE922B5207}.Release.ActiveCfg = Release|Win32
+               {B3636594-A785-4270-A765-8EAE922B5207}.Release.Build.0 = Release|Win32
+       EndGlobalSection
+       GlobalSection(ExtensibilityGlobals) = postSolution
+       EndGlobalSection
+       GlobalSection(ExtensibilityAddIns) = postSolution
+       EndGlobalSection
+EndGlobal
diff --git a/ext/mbstring/libmbfl/libmbfl.vcproj b/ext/mbstring/libmbfl/libmbfl.vcproj
new file mode 100755 (executable)
index 0000000..29e0af0
--- /dev/null
@@ -0,0 +1,650 @@
+<?xml version="1.0" encoding = "shift_jis"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="7.00"
+       Name="libmbfl"
+       ProjectGUID="{B3636594-A785-4270-A765-8EAE922B5207}"
+       SccProjectName=""
+       SccLocalPath="">
+       <Platforms>
+               <Platform
+                       Name="Win32"/>
+       </Platforms>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory=".\Debug"
+                       IntermediateDirectory=".\Debug"
+                       ConfigurationType="2"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="FALSE"
+                       CharacterSet="2">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories="mbfl,."
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBMBFL_EXPORTS;MBFL_DLL_EXPORT;HAVE_CONFIG_H=1"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="1"
+                               UsePrecompiledHeader="2"
+                               PrecompiledHeaderFile=".\Debug/mbfl.pch"
+                               AssemblerListingLocation=".\Debug/"
+                               ObjectFile=".\Debug/"
+                               ProgramDataBaseFileName=".\Debug/"
+                               WarningLevel="3"
+                               SuppressStartupBanner="TRUE"
+                               DebugInformationFormat="4"
+                               CompileAs="0"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalOptions="/MACHINE:I386"
+                               AdditionalDependencies="odbc32.lib odbccp32.lib"
+                               OutputFile=".\Debug/mbfl.dll"
+                               LinkIncremental="2"
+                               SuppressStartupBanner="TRUE"
+                               ModuleDefinitionFile=""
+                               GenerateDebugInformation="TRUE"
+                               ProgramDatabaseFile=".\Debug/mbfl.pdb"
+                               ImportLibrary=".\Debug/mbfl.lib"/>
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               MkTypLibCompatible="TRUE"
+                               SuppressStartupBanner="TRUE"
+                               TargetEnvironment="1"
+                               TypeLibraryName=".\Debug/mbfl.tlb"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               Culture="1041"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory=".\Release"
+                       IntermediateDirectory=".\Release"
+                       ConfigurationType="2"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="FALSE"
+                       CharacterSet="2">
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               InlineFunctionExpansion="1"
+                               AdditionalIncludeDirectories="mbfl,."
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBMBFL_EXPORTS;HAVE_CONFIG_H"
+                               StringPooling="TRUE"
+                               RuntimeLibrary="0"
+                               EnableFunctionLevelLinking="TRUE"
+                               UsePrecompiledHeader="2"
+                               PrecompiledHeaderFile=".\Release/mbfl.pch"
+                               AssemblerListingLocation=".\Release/"
+                               ObjectFile=".\Release/"
+                               ProgramDataBaseFileName=".\Release/"
+                               WarningLevel="3"
+                               SuppressStartupBanner="TRUE"
+                               CompileAs="0"/>
+                       <Tool
+                               Name="VCCustomBuildTool"/>
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalOptions="/MACHINE:I386"
+                               AdditionalDependencies="odbc32.lib odbccp32.lib"
+                               OutputFile=".\Release/mbfl.dll"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="TRUE"
+                               ModuleDefinitionFile=""
+                               ProgramDatabaseFile=".\Release/mbfl.pdb"
+                               ImportLibrary=".\Release/mbfl.lib"/>
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               MkTypLibCompatible="TRUE"
+                               SuppressStartupBanner="TRUE"
+                               TargetEnvironment="1"
+                               TypeLibraryName=".\Release/mbfl.tlb"/>
+                       <Tool
+                               Name="VCPostBuildEventTool"/>
+                       <Tool
+                               Name="VCPreBuildEventTool"/>
+                       <Tool
+                               Name="VCPreLinkEventTool"/>
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               Culture="1033"/>
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"/>
+                       <Tool
+                               Name="VCWebDeploymentTool"/>
+               </Configuration>
+       </Configurations>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="vc6">
+                       <File
+                               RelativePath=".\filters\html_entities.c">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfilter.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_7bit.c">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfilter_8bit.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_ascii.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_base64.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_big5.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_byte2.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_byte4.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_cp1251.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_cp1252.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_cp866.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_cp932.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_cp936.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_euc_cn.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_euc_jp.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_euc_jp_win.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_euc_kr.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_euc_tw.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_htmlent.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_hz.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso2022_kr.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_1.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_10.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_13.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_14.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_15.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_16.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_2.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_3.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_4.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_5.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_6.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_7.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_8.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_9.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_jis.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_koi8r.c">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfilter_pass.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_qprint.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_sjis.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_ucs2.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_ucs4.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_uhc.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_utf16.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_utf32.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_utf7.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_utf7imap.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_utf8.c">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_uuencode.c">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfilter_wchar.c">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_allocators.c">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_convert.c">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_encoding.c">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_filter_output.c">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_ident.c">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_language.c">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_memory_device.c">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_string.c">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_de.c">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_en.c">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_ja.c">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_kr.c">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_neutral.c">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_ru.c">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_uni.c">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_zh.c">
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl">
+                       <File
+                               RelativePath=".\config.h.vc6">
+                               <FileConfiguration
+                                       Name="Debug|Win32">
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               CommandLine="copy $(InputDir)\config.h.vc6 &quot;$(InputDir)\config.h&quot;
+"
+                                               Outputs="$(InputDir)\config.h"/>
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32">
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               CommandLine="copy $(InputDir)\config.h.vc6 &quot;$(InputDir)\config.h&quot;
+"
+                                               Outputs="$(InputDir)\config.h"/>
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath=".\filters\cp932_table.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\html_entities.h">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfilter.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_7bit.h">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfilter_8bit.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_ascii.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_base64.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_big5.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_byte2.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_byte4.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_cp1251.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_cp1252.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_cp866.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_cp932.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_cp936.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_euc_cn.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_euc_jp.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_euc_jp_win.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_euc_kr.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_euc_tw.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_htmlent.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_hz.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso2022_kr.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_1.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_10.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_13.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_14.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_15.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_16.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_2.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_3.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_4.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_5.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_6.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_7.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_8.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_iso8859_9.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_jis.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_koi8r.h">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfilter_pass.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_qprint.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_sjis.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_ucs2.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_ucs4.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_uhc.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_utf16.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_utf32.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_utf7.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_utf7imap.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_utf8.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\mbfilter_uuencode.h">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfilter_wchar.h">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_allocators.h">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_consts.h">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_convert.h">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_encoding.h">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_filter_output.h">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_ident.h">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_language.h">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_memory_device.h">
+                       </File>
+                       <File
+                               RelativePath=".\mbfl\mbfl_string.h">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_de.h">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_en.h">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_ja.h">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_kr.h">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_neutral.h">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_ru.h">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_uni.h">
+                       </File>
+                       <File
+                               RelativePath=".\nls\nls_zh.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_prop.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_big5.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_cns11643.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_cp1251.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_cp1252.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_cp866.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_cp932_ext.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_cp936.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_iso8859_10.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_iso8859_13.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_iso8859_14.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_iso8859_15.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_iso8859_16.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_iso8859_2.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_iso8859_3.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_iso8859_4.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_iso8859_5.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_iso8859_6.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_iso8859_7.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_iso8859_8.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_iso8859_9.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_jis.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_koi8r.h">
+                       </File>
+                       <File
+                               RelativePath=".\filters\unicode_table_uhc.h">
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+                       <File
+                               RelativePath=".\mbfl.rc">
+                       </File>
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk b/ext/mbstring/libmbfl/mbfl/mk_eaw_tbl.awk
new file mode 100644 (file)
index 0000000..c7deb4c
--- /dev/null
@@ -0,0 +1,80 @@
+#!/usr/bin/awk -f
+#
+# $Id$
+#
+# Description: a script to generate east asian width table.
+#
+
+BEGIN {
+       prev = -1
+       comma = 0
+       ORS = ""
+       FS = "[;.|# ]"
+       print "static const struct {\n\tint begin;\n\tint end;\n} " TABLE_NAME "[] = {\n\t"
+}
+
+/^#/ {
+}
+
+/^[0-9a-fA-F]+;/ {
+       if ($2 == "W" || $2 == "F") {
+               v = ( "0x" $1 ) + 0
+               if (prev < 0) {
+                       first = v
+               } else if (v - prev > 1) {
+                       if (comma) {
+                               print ",\n\t"
+                       }
+                       printf("{ 0x%04x, 0x%04x }", first, prev)
+                       first = v
+                       comma = 1
+               }
+               prev = v
+       } else {
+               if (prev >= 0) {
+                       if (comma) {
+                               print ",\n\t"
+                       }
+                       printf("{ 0x%04x, 0x%04x }", first, prev)
+                       prev = -1
+                       comma = 1
+               }
+       }
+}
+
+/^[0-9a-fA-F]+\.\./ {
+       if ($4 == "W" || $4 == "F") {
+               vs = ( "0x" $1 ) + 0
+               ve = ( "0x" $3 ) + 0
+               if (prev < 0) {
+                       first = vs
+               } else if (vs - prev > 1) {
+                       if (comma) {
+                               print ",\n\t"
+                       }
+                       printf("{ 0x%04x, 0x%04x }", first, prev)
+                       first = vs
+                       comma = 1
+               }
+               prev = ve
+       } else {
+               if (prev >= 0) {
+                       if (comma) {
+                               print ",\n\t"
+                       }
+                       printf("{ 0x%04x, 0x%04x }", first, prev)
+                       prev = -1
+                       comma = 1
+               }
+       }
+}
+
+END {
+       if (prev >= 0) {
+               if (comma) {
+                       print ",\n\t"
+               }
+               printf("{ 0x%04x, 0x%04x }", first, prev)
+       }
+       print "\n};\n"
+} 
diff --git a/ext/mbstring/tests/bug31911.phpt b/ext/mbstring/tests/bug31911.phpt
new file mode 100644 (file)
index 0000000..eb6438d
--- /dev/null
@@ -0,0 +1,11 @@
+--TEST--
+Bug #31911 (mb_decode_mimeheader() is case-sensitive to hex escapes)
+--FILE--
+<?php
+echo mb_decode_mimeheader("Works: =?iso-8859-1?q?=3F=3F=3F?=");
+echo "\n";
+echo mb_decode_mimeheader("Fails: =?iso-8859-1?q?=3f=3f=3f?=")
+?>
+--EXPECT--
+Works: ???
+Fails: ???