sender 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,12 @@
1
- === 1.0.1 2010-06-22
1
+ === 1.0.0 2010-06-22
2
2
 
3
3
  Initial release
4
+
5
+ === 1.0.1 2010-06-22
6
+
7
+ Minor detail changes
8
+
9
+ === 1.1 2010-06-23
10
+
11
+ Added Kernel.backtrace
12
+ Added Kernel.backtrace_includes?
data/Makefile CHANGED
@@ -41,7 +41,7 @@ sitearchdir = $(sitelibdir)/$(sitearch)
41
41
  vendorlibdir = $(vendordir)/$(ruby_version)
42
42
  vendorarchdir = $(vendorlibdir)/$(sitearch)
43
43
 
44
- CC = /Developer/usr/bin/clang
44
+ CC = gcc
45
45
  CXX = g++
46
46
  LIBRUBY = $(LIBRUBY_SO)
47
47
  LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
@@ -52,7 +52,7 @@ COUTFLAG = -o
52
52
 
53
53
  RUBY_EXTCONF_H =
54
54
  cflags = $(optflags) $(debugflags) $(warnflags)
55
- optflags = -O2
55
+ optflags =
56
56
  debugflags = -g
57
57
  warnflags = -Wall -Wno-parentheses
58
58
  CFLAGS = -fno-common $(cflags) -fno-common -pipe -fno-common
data/Manifest.txt CHANGED
@@ -4,14 +4,41 @@ Makefile
4
4
  Manifest.txt
5
5
  README.rdoc
6
6
  Rakefile
7
+ ext/sender/RPSender_internal.c
8
+ ext/sender/RPSender_internal.h
7
9
  ext/sender/RubySourceSupport.c
8
10
  ext/sender/RubySourceSupport.h
11
+ ext/sender/debug.h
12
+ ext/sender/dln.h
13
+ ext/sender/encdb.h
14
+ ext/sender/eval_intern.h
9
15
  ext/sender/extconf.rb
16
+ ext/sender/gc.h
17
+ ext/sender/id.h
18
+ ext/sender/iseq.h
10
19
  ext/sender/main.c
20
+ ext/sender/node.h
21
+ ext/sender/parse.h
11
22
  ext/sender/rb_Global.c
12
23
  ext/sender/rb_Global.h
13
24
  ext/sender/rb_Global_internal.h
25
+ ext/sender/rb_Kernel.c
26
+ ext/sender/rb_Kernel.h
27
+ ext/sender/regenc.h
28
+ ext/sender/regint.h
29
+ ext/sender/regparse.h
30
+ ext/sender/revision.h
31
+ ext/sender/thread_pthread.h
32
+ ext/sender/thread_win32.h
33
+ ext/sender/transcode_data.h
34
+ ext/sender/transdb.h
35
+ ext/sender/version.h
36
+ ext/sender/vm_core.h
37
+ ext/sender/vm_exec.h
38
+ ext/sender/vm_insnhelper.h
39
+ ext/sender/vm_opts.h
14
40
  lib/sender.rb
15
41
  lib/sender/sender.bundle
16
42
  mkmf.log
43
+ sender.gemspec
17
44
  test/test_sender.rb
data/README.rdoc CHANGED
@@ -1,40 +1,90 @@
1
1
  Sender:
2
2
 
3
3
  == DESCRIPTION:
4
+ http://rubygems.org/gems/sender
4
5
 
5
6
  Adds __sender__ and __caller__ to the built-in __callee__ and __method__ functions.
7
+
8
+ Adds object-oriented backtrace, which returns :object and :method for each stack frame,
9
+ and which permits queries regarding backtrace contents.
10
+
11
+ * __sender__
12
+ * __caller__
13
+ * backtrace
14
+ * backtrace( frames_to_trace_backward )
15
+ * backtrace_includes?( Class )
16
+ * backtrace_includes?( class_instance )
17
+ * backtrace_includes?( :symbol )
18
+ * backtrace_includes?( Class, class_instance, :symbol, ... )
6
19
 
7
- == SYNOPSIS:
20
+ == INSTALL:
8
21
 
9
- Example:
22
+ * sudo gem install sender
10
23
 
11
- require 'sender'
24
+ == EXAMPLE:
12
25
 
13
- class SenderTest
14
- def sender_test
15
- puts( 'Caller was: ' + __caller__.to_s )
16
- puts( 'Sender was: ' + __sender__.to_s )
17
- end
18
- end
26
+ require 'sender'
19
27
 
20
- class Test
21
- def run_tests
22
- test = SenderTest.new
23
- test.sender_test
24
- end
25
- end
28
+ require '../sender/lib/sender/sender'
26
29
 
27
- test = Test.new
28
- test.run_tests
29
-
30
- Outputs:
31
-
32
- Caller was: sender_test
33
- Sender was: #<SenderTest:0x0000010103ee88>
30
+ require 'pp'
34
31
 
35
- == INSTALL:
32
+ class Test
36
33
 
37
- * sudo gem install sender
34
+ def test
35
+ self.another_test
36
+ end
37
+
38
+ def another_test
39
+ test2 = Test2.new
40
+ test2.and_another_test_in_another_object
41
+ end
42
+
43
+ end
44
+
45
+ class Test2
46
+
47
+ def and_another_test_in_another_object
48
+ puts 'Sender was: ' + __sender__.pretty_inspect.to_s
49
+ puts 'Caller was: ' + __caller__.to_s
50
+ pp Kernel.backtrace
51
+ pp Kernel.backtrace( 2 )
52
+ puts 'These should be true:'
53
+ pp Kernel.backtrace_includes?( :another_test )
54
+ pp Kernel.backtrace_includes?( Test )
55
+ pp Kernel.backtrace_includes?( $test )
56
+ pp Kernel.backtrace_includes?( :another_test, Test, $test )
57
+ puts 'These should be false:'
58
+ pp Kernel.backtrace_includes?( :non_existing_function )
59
+ pp Kernel.backtrace_includes?( Test2 )
60
+ pp Kernel.backtrace_includes?( self )
61
+ pp Kernel.backtrace_includes?( :non_existing_function, Test2, self )
62
+ end
63
+
64
+ end
65
+
66
+ $test = Test.new
67
+ $test.test
68
+
69
+ == EXAMPLE's OUTPUT:
70
+
71
+ Sender was: #<Test:0x0000010101ef18>
72
+ Caller was: and_another_test_in_another_object
73
+ [{:object=>#<Test:0x0000010101ef18>, :method=>:another_test},
74
+ {:object=>#<Test:0x0000010101ef18>, :method=>:test},
75
+ {:object=>main}]
76
+ [{:object=>#<Test:0x0000010101ef18>, :method=>:another_test},
77
+ {:object=>#<Test:0x0000010101ef18>, :method=>:test}]
78
+ These should be true:
79
+ true
80
+ true
81
+ true
82
+ true
83
+ These should be false:
84
+ false
85
+ false
86
+ false
87
+ false
38
88
 
39
89
  == LICENSE:
40
90
 
data/Rakefile CHANGED
@@ -11,6 +11,8 @@ Hoe.spec 'sender' do
11
11
  self.spec_extras = { :extensions => ["ext/sender/extconf.rb"] }
12
12
  self.extra_dev_deps << ['rake-compiler', '>= 0']
13
13
 
14
+ self.version="1.1.0"
15
+
14
16
  Rake::ExtensionTask.new( 'sender', spec ) do |ext|
15
17
  ext.lib_dir = File.join('lib', 'sender')
16
18
  end
@@ -20,6 +22,6 @@ Rake::Task[:test].prerequisites << :compile
20
22
 
21
23
  task :cultivate do
22
24
  system "touch Manifest.txt; rake check_manifest | grep -v \"(in \" | patch"
23
- system "rake debug_gem | grep -v \"(in \" > `basename \\`pwd\\``.gemspec"
25
+ system "rake debug_gem | grep -v \"(in \" > sender.gemspec"
24
26
  end
25
27
 
@@ -0,0 +1,64 @@
1
+
2
+ #include "RPSender_internal.h"
3
+ #include "RubySourceSupport.h"
4
+
5
+ /*************************
6
+ * framePriorToCurrent *
7
+ ************************/
8
+
9
+ rb_control_frame_t* RPRuby_internal_framePriorTo( rb_control_frame_t* control_frame ) {
10
+
11
+ rb_thread_t* c_thread = GET_THREAD();
12
+ rb_control_frame_t* prior_control_frame = NULL;
13
+ // get the current frame pointer
14
+ if ( control_frame == NULL ) {
15
+ control_frame = c_thread->cfp;
16
+ }
17
+
18
+ if ( ( prior_control_frame = rb_vm_get_ruby_level_next_cfp( c_thread, control_frame ) ) != 0) {
19
+
20
+ prior_control_frame = RUBY_VM_PREVIOUS_CONTROL_FRAME( prior_control_frame );
21
+
22
+ }
23
+ else {
24
+ prior_control_frame = NULL;
25
+ }
26
+
27
+ // if we have a nil object we've passed main, we're done
28
+ if ( prior_control_frame->self == Qnil ) {
29
+ return NULL;
30
+ }
31
+
32
+ return prior_control_frame;
33
+
34
+ }
35
+
36
+ /**********************************
37
+ * backtraceHashForControlFrame *
38
+ *********************************/
39
+
40
+ VALUE RPSender_internal_backtraceHashForControlFrame( rb_control_frame_t* c_control_frame ) {
41
+
42
+ // create new hash for this frame
43
+ VALUE rb_frame_hash = rb_hash_new();
44
+
45
+ // get object and set in hash
46
+ VALUE rb_object_for_frame = c_control_frame->self;
47
+ // if we get nil we're done with our backtrace
48
+ rb_hash_aset( rb_frame_hash,
49
+ ID2SYM( rb_intern( "object" ) ),
50
+ rb_object_for_frame );
51
+
52
+ // get method and set in hash
53
+ ID c_frame_function_id = frame_func_id( c_control_frame );
54
+ // main has no method name
55
+ if ( c_frame_function_id != 0) {
56
+ VALUE rb_method_for_frame = ID2SYM( c_frame_function_id );
57
+ rb_hash_aset( rb_frame_hash,
58
+ ID2SYM( rb_intern( "method" ) ),
59
+ rb_method_for_frame );
60
+
61
+ }
62
+
63
+ return rb_frame_hash;
64
+ }
@@ -0,0 +1,10 @@
1
+ #ifndef RP_SENDER_INTERNAL
2
+ #define RP_SENDER_INTERNAL
3
+
4
+ #include "ruby.h"
5
+ #include "eval_intern.h"
6
+
7
+ rb_control_frame_t* RPRuby_internal_framePriorTo( rb_control_frame_t* control_frame );
8
+ VALUE RPSender_internal_backtraceHashForControlFrame( rb_control_frame_t* c_control_frame );
9
+
10
+ #endif
@@ -1,8 +1,6 @@
1
1
 
2
2
  #include "RubySourceSupport.h"
3
3
 
4
- #include "vm_exec.h"
5
-
6
4
  // Taken from eval.c in Ruby source
7
5
  // No header, so easiest way to integrate was to copy the code and make my own header.
8
6
  // Previously declared static; otherwise unchanged
@@ -14,6 +12,7 @@ ID frame_func_id( rb_control_frame_t *cfp )
14
12
  return cfp->method_id;
15
13
  }
16
14
  while (iseq) {
15
+
17
16
  if (RUBY_VM_IFUNC_P(iseq)) {
18
17
  return rb_intern("<ifunc>");
19
18
  }
@@ -38,3 +37,4 @@ ID rb_frame_caller(void)
38
37
  }
39
38
  return frame_func_id(prev_cfp);
40
39
  }
40
+
@@ -1,9 +1,9 @@
1
- #ifndef RP_SENDER_CALLER_RUBY_SOURCE_SUPPORT
2
- #define RP_SENDER_CALLER_RUBY_SOURCE_SUPPORT
3
-
4
- #include <ruby.h>
1
+ #ifndef RP_SENDER_RUBY_SOURCE_SUPPORT
2
+ #define RP_SENDER_RUBY_SOURCE_SUPPORT
5
3
 
4
+ #include "ruby.h"
6
5
  #include "eval_intern.h"
6
+ #include "vm_core.h"
7
7
 
8
8
  ID frame_func_id( rb_control_frame_t *cfp );
9
9
  ID rb_frame_caller(void);
@@ -0,0 +1,36 @@
1
+ /**********************************************************************
2
+
3
+ debug.h - YARV Debug function interface
4
+
5
+ $Author: ko1 $
6
+ created at: 04/08/25 02:33:49 JST
7
+
8
+ Copyright (C) 2004-2007 Koichi Sasada
9
+
10
+ **********************************************************************/
11
+
12
+ #ifndef RUBY_DEBUG_H
13
+ #define RUBY_DEBUG_H
14
+
15
+ #include "ruby/ruby.h"
16
+ #include "node.h"
17
+
18
+ #define dpv(h,v) ruby_debug_print_value(-1, 0, h, v)
19
+ #define dp(v) ruby_debug_print_value(-1, 0, "", v)
20
+ #define dpi(i) ruby_debug_print_id(-1, 0, "", i)
21
+ #define dpn(n) ruby_debug_print_node(-1, 0, "", n)
22
+
23
+ #define bp() ruby_debug_breakpoint()
24
+
25
+ VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v);
26
+ ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id);
27
+ NODE *ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node);
28
+ int ruby_debug_print_indent(int level, int debug_level, int indent_level);
29
+ void ruby_debug_breakpoint(void);
30
+ void ruby_debug_gc_check_func(void);
31
+
32
+ #ifdef RUBY_DEBUG_ENV
33
+ void ruby_set_debug_option(const char *str);
34
+ #endif
35
+
36
+ #endif /* RUBY_DEBUG_H */
data/ext/sender/dln.h ADDED
@@ -0,0 +1,41 @@
1
+ /**********************************************************************
2
+
3
+ dln.h -
4
+
5
+ $Author: nobu $
6
+ created at: Wed Jan 19 16:53:09 JST 1994
7
+
8
+ Copyright (C) 1993-2007 Yukihiro Matsumoto
9
+
10
+ **********************************************************************/
11
+
12
+ #ifndef DLN_H
13
+ #define DLN_H
14
+
15
+ #ifdef __cplusplus
16
+ # ifndef HAVE_PROTOTYPES
17
+ # define HAVE_PROTOTYPES 1
18
+ # endif
19
+ # ifndef HAVE_STDARG_PROTOTYPES
20
+ # define HAVE_STDARG_PROTOTYPES 1
21
+ # endif
22
+ #endif
23
+
24
+ #undef _
25
+ #ifdef HAVE_PROTOTYPES
26
+ # define _(args) args
27
+ #else
28
+ # define _(args) ()
29
+ #endif
30
+
31
+ DEPRECATED(char *dln_find_exe(const char*,const char*));
32
+ DEPRECATED(char *dln_find_file(const char*,const char*));
33
+ char *dln_find_exe_r(const char*,const char*,char*,int);
34
+ char *dln_find_file_r(const char*,const char*,char*,int);
35
+
36
+ #ifdef USE_DLN_A_OUT
37
+ extern char *dln_argv0;
38
+ #endif
39
+
40
+ void *dln_load(const char*);
41
+ #endif
@@ -0,0 +1,147 @@
1
+ ENC_DEFINE("ASCII-8BIT");
2
+ ENC_DEFINE("Big5");
3
+ ENC_DEFINE("CP949");
4
+ ENC_DEFINE("Emacs-Mule");
5
+ ENC_DEFINE("EUC-JP");
6
+ ENC_DEFINE("EUC-KR");
7
+ ENC_DEFINE("EUC-TW");
8
+ ENC_DEFINE("GB18030");
9
+ ENC_DEFINE("GBK");
10
+ ENC_DEFINE("ISO-8859-1");
11
+ ENC_DEFINE("ISO-8859-2");
12
+ ENC_DEFINE("ISO-8859-3");
13
+ ENC_DEFINE("ISO-8859-4");
14
+ ENC_DEFINE("ISO-8859-5");
15
+ ENC_DEFINE("ISO-8859-6");
16
+ ENC_DEFINE("ISO-8859-7");
17
+ ENC_DEFINE("ISO-8859-8");
18
+ ENC_DEFINE("ISO-8859-9");
19
+ ENC_DEFINE("ISO-8859-10");
20
+ ENC_DEFINE("ISO-8859-11");
21
+ ENC_DEFINE("ISO-8859-13");
22
+ ENC_DEFINE("ISO-8859-14");
23
+ ENC_DEFINE("ISO-8859-15");
24
+ ENC_DEFINE("ISO-8859-16");
25
+ ENC_DEFINE("KOI8-R");
26
+ ENC_DEFINE("KOI8-U");
27
+ ENC_DEFINE("Shift_JIS");
28
+ ENC_DEFINE("US-ASCII");
29
+ ENC_DEFINE("UTF-8");
30
+ ENC_DEFINE("UTF-16BE");
31
+ ENC_DEFINE("UTF-16LE");
32
+ ENC_DEFINE("UTF-32BE");
33
+ ENC_DEFINE("UTF-32LE");
34
+ ENC_DEFINE("Windows-1251");
35
+ ENC_ALIAS("BINARY", "ASCII-8BIT");
36
+ ENC_REPLICATE("IBM437", "ASCII-8BIT");
37
+ ENC_ALIAS("CP437", "IBM437");
38
+ ENC_REPLICATE("IBM737", "ASCII-8BIT");
39
+ ENC_ALIAS("CP737", "IBM737");
40
+ ENC_REPLICATE("IBM775", "ASCII-8BIT");
41
+ ENC_ALIAS("CP775", "IBM775");
42
+ ENC_REPLICATE("CP850", "ASCII-8BIT");
43
+ ENC_ALIAS("IBM850", "CP850");
44
+ ENC_REPLICATE("IBM852", "ASCII-8BIT");
45
+ ENC_REPLICATE("CP852", "IBM852");
46
+ ENC_REPLICATE("IBM855", "ASCII-8BIT");
47
+ ENC_REPLICATE("CP855", "IBM855");
48
+ ENC_REPLICATE("IBM857", "ASCII-8BIT");
49
+ ENC_ALIAS("CP857", "IBM857");
50
+ ENC_REPLICATE("IBM860", "ASCII-8BIT");
51
+ ENC_ALIAS("CP860", "IBM860");
52
+ ENC_REPLICATE("IBM861", "ASCII-8BIT");
53
+ ENC_ALIAS("CP861", "IBM861");
54
+ ENC_REPLICATE("IBM862", "ASCII-8BIT");
55
+ ENC_ALIAS("CP862", "IBM862");
56
+ ENC_REPLICATE("IBM863", "ASCII-8BIT");
57
+ ENC_ALIAS("CP863", "IBM863");
58
+ ENC_REPLICATE("IBM864", "ASCII-8BIT");
59
+ ENC_ALIAS("CP864", "IBM864");
60
+ ENC_REPLICATE("IBM865", "ASCII-8BIT");
61
+ ENC_ALIAS("CP865", "IBM865");
62
+ ENC_REPLICATE("IBM866", "ASCII-8BIT");
63
+ ENC_ALIAS("CP866", "IBM866");
64
+ ENC_REPLICATE("IBM869", "ASCII-8BIT");
65
+ ENC_ALIAS("CP869", "IBM869");
66
+ ENC_REPLICATE("Windows-1258", "ASCII-8BIT");
67
+ ENC_ALIAS("CP1258", "Windows-1258");
68
+ ENC_REPLICATE("GB1988", "ASCII-8BIT");
69
+ ENC_REPLICATE("macCentEuro", "ASCII-8BIT");
70
+ ENC_REPLICATE("macCroatian", "ASCII-8BIT");
71
+ ENC_REPLICATE("macCyrillic", "ASCII-8BIT");
72
+ ENC_REPLICATE("macGreek", "ASCII-8BIT");
73
+ ENC_REPLICATE("macIceland", "ASCII-8BIT");
74
+ ENC_REPLICATE("macRoman", "ASCII-8BIT");
75
+ ENC_REPLICATE("macRomania", "ASCII-8BIT");
76
+ ENC_REPLICATE("macThai", "ASCII-8BIT");
77
+ ENC_REPLICATE("macTurkish", "ASCII-8BIT");
78
+ ENC_REPLICATE("macUkraine", "ASCII-8BIT");
79
+ ENC_ALIAS("CP950", "BIG5");
80
+ ENC_REPLICATE("stateless-ISO-2022-JP", "Emacs-Mule");
81
+ ENC_ALIAS("eucJP", "EUC-JP") /* UI-OSF Application Platform Profile for Japanese Environment Version 1.1 */;
82
+ ENC_REPLICATE("eucJP-ms", "EUC-JP") /* TOG/JVC CDE/Motif Technical WG */;
83
+ ENC_ALIAS("euc-jp-ms", "eucJP-ms");
84
+ ENC_REPLICATE("CP51932", "EUC-JP");
85
+ ENC_ALIAS("eucKR", "EUC-KR");
86
+ ENC_ALIAS("eucTW", "EUC-TW");
87
+ ENC_ALIAS("EUC-CN", "GB2312");
88
+ ENC_ALIAS("eucCN", "GB2312");
89
+ ENC_REPLICATE("GB12345", "GB2312");
90
+ ENC_ALIAS("CP936", "GBK");
91
+ ENC_DUMMY("ISO-2022-JP");
92
+ ENC_ALIAS("ISO2022-JP", "ISO-2022-JP");
93
+ ENC_REPLICATE("ISO-2022-JP-2", "ISO-2022-JP");
94
+ ENC_ALIAS("ISO2022-JP2", "ISO-2022-JP-2");
95
+ ENC_ALIAS("ISO8859-1", "ISO-8859-1");
96
+ ENC_REPLICATE("Windows-1252", "ISO-8859-1");
97
+ ENC_ALIAS("CP1252", "Windows-1252");
98
+ ENC_ALIAS("ISO8859-2", "ISO-8859-2");
99
+ ENC_REPLICATE("Windows-1250", "ISO-8859-2");
100
+ ENC_ALIAS("CP1250", "Windows-1250");
101
+ ENC_ALIAS("ISO8859-3", "ISO-8859-3");
102
+ ENC_ALIAS("ISO8859-4", "ISO-8859-4");
103
+ ENC_ALIAS("ISO8859-5", "ISO-8859-5");
104
+ ENC_ALIAS("ISO8859-6", "ISO-8859-6");
105
+ ENC_REPLICATE("Windows-1256", "ISO-8859-6");
106
+ ENC_ALIAS("CP1256", "Windows-1256");
107
+ ENC_ALIAS("ISO8859-7", "ISO-8859-7");
108
+ ENC_REPLICATE("Windows-1253", "ISO-8859-7");
109
+ ENC_ALIAS("CP1253", "Windows-1253");
110
+ ENC_ALIAS("ISO8859-8", "ISO-8859-8");
111
+ ENC_REPLICATE("Windows-1255", "ISO-8859-8");
112
+ ENC_ALIAS("CP1255", "Windows-1255");
113
+ ENC_ALIAS("ISO8859-9", "ISO-8859-9");
114
+ ENC_REPLICATE("Windows-1254", "ISO-8859-9");
115
+ ENC_ALIAS("CP1254", "Windows-1254");
116
+ ENC_ALIAS("ISO8859-10", "ISO-8859-10");
117
+ ENC_ALIAS("ISO8859-11", "ISO-8859-11");
118
+ ENC_REPLICATE("TIS-620", "ISO-8859-11");
119
+ ENC_REPLICATE("Windows-874", "ISO-8859-11");
120
+ ENC_ALIAS("CP874", "Windows-874");
121
+ ENC_ALIAS("ISO8859-13", "ISO-8859-13");
122
+ ENC_REPLICATE("Windows-1257", "ISO-8859-13");
123
+ ENC_ALIAS("CP1257", "Windows-1257");
124
+ ENC_ALIAS("ISO8859-14", "ISO-8859-14");
125
+ ENC_ALIAS("ISO8859-15", "ISO-8859-15");
126
+ ENC_ALIAS("ISO8859-16", "ISO-8859-16");
127
+ ENC_ALIAS("CP878", "KOI8-R");
128
+ ENC_ALIAS("SJIS", "Shift_JIS");
129
+ ENC_REPLICATE("Windows-31J", "Shift_JIS");
130
+ ENC_ALIAS("CP932", "Windows-31J");
131
+ ENC_ALIAS("csWindows31J", "Windows-31J") /* IANA. IE6 don't accept Windows-31J but csWindows31J. */;
132
+ ENC_REPLICATE("MacJapanese", "Shift_JIS");
133
+ ENC_ALIAS("MacJapan", "MacJapanese");
134
+ ENC_ALIAS("ASCII", "US-ASCII");
135
+ ENC_ALIAS("ANSI_X3.4-1968", "US-ASCII");
136
+ ENC_ALIAS("646", "US-ASCII");
137
+ ENC_DUMMY("UTF-7");
138
+ ENC_ALIAS("CP65000", "UTF-7");
139
+ ENC_ALIAS("CP65001", "UTF-8");
140
+ ENC_REPLICATE("UTF8-MAC", "UTF-8");
141
+ ENC_ALIAS("UTF-8-MAC", "UTF8-MAC");
142
+ ENC_ALIAS("UCS-2BE", "UTF-16BE");
143
+ ENC_ALIAS("UCS-4BE", "UTF-32BE");
144
+ ENC_ALIAS("UCS-4LE", "UTF-32LE");
145
+ ENC_ALIAS("CP1251", "Windows-1251");
146
+
147
+ #define ENCODING_COUNT 83