summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--encoding.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/encoding.js b/encoding.js
index 2f0ad8c..d263fd1 100644
--- a/encoding.js
+++ b/encoding.js
@@ -5,10 +5,7 @@ function decode_charsets( str, encoding ) {
5 return decode_jis( str ); 5 return decode_jis( str );
6 } 6 }
7 7
8 map = encodings[encoding]; 8 map = encodings[encoding] || enc_8859_1;
9 if( map == null ) {
10 map = enc_8859_1;
11 }
12 9
13 for( var i=0; i< str.length; ++i ) { 10 for( var i=0; i< str.length; ++i ) {
14 var append = str.charCodeAt(i) & 0xff; 11 var append = str.charCodeAt(i) & 0xff;
@@ -132,4 +129,5 @@ var encodings = {
132 "ibm437":enc_CP437,"ibm737":enc_CP737,"ibm775":enc_CP775,"ibm850":enc_CP850,"ibm852":enc_CP852,"ibm855":enc_CP855,"ibm857":enc_CP857, 129 "ibm437":enc_CP437,"ibm737":enc_CP737,"ibm775":enc_CP775,"ibm850":enc_CP850,"ibm852":enc_CP852,"ibm855":enc_CP855,"ibm857":enc_CP857,
133 "ibm860":enc_CP860,"ibm861":enc_CP861,"ibm862":enc_CP862,"ibm863":enc_CP863,"ibm864":enc_CP864,"ibm865":enc_CP865,"ibm866":enc_CP866, 130 "ibm860":enc_CP860,"ibm861":enc_CP861,"ibm862":enc_CP862,"ibm863":enc_CP863,"ibm864":enc_CP864,"ibm865":enc_CP865,"ibm866":enc_CP866,
134 "cp869": enc_CP869,"cp-gr": enc_CP869,"ibm869":enc_CP869,"windows-874": enc_CP874,"cp874":enc_CP874,"ibm874":enc_CP874 131 "cp869": enc_CP869,"cp-gr": enc_CP869,"ibm869":enc_CP869,"windows-874": enc_CP874,"cp874":enc_CP874,"ibm874":enc_CP874
135}; \ No newline at end of file 132};
133