Commit Graph

4148 Commits

Author SHA1 Message Date
Keyur Govande
ab6c1d21f9 Undo inadvertent commit of php_version 2014-07-30 02:34:21 +00:00
Keyur Govande
65364fe7d0 Corrected patch for bug #60616
For unixODBC, use ODBC version as defined by it (as of v2.2.14 it is 3.5).
This allows us to use newer features like SQL_DESC_OCTET_LENGTH (which
returns the number of bytes required to store the data). This fixes the issue
in #60616. If the newer version is not available, over-allocate to accomodate
4-byte Unicode characters for CHAR and VARCHAR datatypes (and their Wide
counterparts).
version.
Fixed a couple of failing tests.
2014-07-30 02:28:31 +00:00
Dmitry Stogov
f2a2fccece Merge branch 'master' into phpng
* master:
  fix nmake snap when ext name is different in target dll
  force atoll macro usage on windows
  Enable $ replacement in exif, ldap, pdo_pgsql and tidy
  See bug #67635
  NEWS
  NEWS
  improve previous, add message during configure
  Fixed bug #67635 php links to systemd libraries without using pkg-config
  Improve fix for #66608
  Fixed segfault with empty break
  New added opcodes don't need to be resloved
  Update NEWS
  Update NEWS
  Update NEWS
  Fixed bug #66827 Session raises E_NOTICE when session name variable is array
  implemented copy libs of core exts in phpize mode
  fix copy the ext dll into the prefix path in phpize mode
  fix default prefix in phpize mode
  fix file with zero size usage in phpize mode

Conflicts:
	Zend/zend_opcode.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/session/session.c
2014-07-22 15:42:17 +04:00
Anatol Belski
833e466983 Merge branch 'PHP-5.6'
* PHP-5.6:
  force atoll macro usage on windows
2014-07-21 10:01:48 +02:00
Anatol Belski
f6d941e4b4 force atoll macro usage on windows 2014-07-21 09:52:52 +02:00
Xinchen Hui
110bf9c720 Merge remote-tracking branch 'origin/master' into phpng
Conflicts:
	Zend/zend_compile.h
	ext/openssl/xp_ssl.c
2014-07-18 16:25:43 +08:00
Lior Kaplan
46dcd12d53 Merge branch 'PHP-5.6'
* PHP-5.6:
  Enable build without atoll (e.g old AIX flavours)
  Enable build without atoll (e.g old AIX flavours)
2014-07-17 23:11:33 +03:00
Lior Kaplan
84673485f5 Enable build without atoll (e.g old AIX flavours) 2014-07-17 23:10:08 +03:00
Dmitry Stogov
9d6e45a0ee Changed zend_make_printable_zval() to return "use_copy" instead of additional reference argument.
Improved branch prediction.
2014-07-09 16:05:55 +04:00
Stanislav Malyshev
b93ea59665 5.4.31 2014-07-08 21:26:39 -07:00
Dmitry Stogov
bce6a36c8a Merge branch 'master' into test
* master: (48 commits)
  change locale - looks like not everybody has sl_SI
  Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone
  fix format
  Fix bug #67052 (NumberFormatter::parse() resets LC_NUMERIC setting)
  Make sure the generator script also creates a newline at the end of file
  Add newline at end of file to prevent compilation warning
  Fix handling of session user module custom handlers.
  Reference bug report instead of github issue in NEWS file
  add more exts for Travis
  Update NEWS
  Fix phpdbg.1 man page installation when build != src directory
  BFN for bug #67551 (php://input temp file will be located in sys_temp_dir instead of upload_tmp_dir)
  reorder
  restore API compatibility
  finish
  refactor php_stream_temp_create{,_ex} and use it for the php://input stream
  refactor _php_stream_fopen_{temporary_,tmp}file()
  fix length overflow of HTTP_RAW_POST_DATA
  Update NEWS
  Fixed bug #67215 (php-cgi work with opcache, may be segmentation fault happen)
  ...

Conflicts:
	ext/opcache/zend_accelerator_util_funcs.c
	ext/session/mod_user.c
	ext/spl/spl_array.c
	ext/spl/spl_dllist.c
	ext/standard/file.c
	ext/standard/streamsfuncs.c
	ext/standard/string.c
	main/streams/memory.c
2014-07-07 19:21:23 +04:00
Dmitry Stogov
7ce2d59ad2 Merge branch 'call-frame' into phpng
* call-frame:
  Simplify call-frame handling
  Removed EG(active_symbol_table) and use corresponding value from EG(current_execute_data)
  Use values from current_execute_data instead of globals where possible
  Removed EG(called_scope) and use corresponding value from EG(current_execute_data)
  Removed EG(in_execution). If EG(currentent_execute_data) is not NULL we are executing something.
  Removed EG(opline_ptr) and use corresponding value from EG(current_execute_data)
  Removed EG(active_op_array) and use corresponding value from EG(current_execute_data)
  Uinified call frame handling for user and internal functions. Now EG(current_execute_data) always point to the call frame of the currently executed function.
  Fixed cleanup of incompleytely passed parameters
  Prohibited parameter redefinition
  Fixed support for extra arguments in conjunction with variadiv argument. Use compile time flags to check if we call constructor and result of ZEND_NEW is used or not.
  Fixed uninitialized variables
  Optimization
  Changed zend_execute_data layout to reduce memory overhead
  Help C compilet to do the better job optimizing target code
  Use fast comparison for (func->type == ZEND_USER_FUNCTION || func->type == ZEND_EVAL_CODE)
  Keep extra args in the same VM stack segment (after all CV and TMP vars)
  Refactoring: merge call_frame and end_execute_data into single data structure. Keep only single copy of each argument on VM stack (previously ZE kept two copies of each arguments for user functions)
  Refactoring: use call_frames instead of call_slots

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2014-07-07 16:19:24 +04:00
Dmitry Stogov
5aa91be509 Simplify call-frame handling 2014-07-07 15:50:44 +04:00
Dmitry Stogov
6bf24f4dd0 Removed EG(active_symbol_table) and use corresponding value from EG(current_execute_data) 2014-07-04 18:03:45 +04:00
Michael Wallner
f9fda21667 Merge branch 'PHP-5.6'
* PHP-5.6:
  BFN for bug #67551 (php://input temp file will be located in sys_temp_dir instead of upload_tmp_dir)
  reorder
  restore API compatibility
  finish
  refactor php_stream_temp_create{,_ex} and use it for the php://input stream
  refactor _php_stream_fopen_{temporary_,tmp}file()
  fix length overflow of HTTP_RAW_POST_DATA

Conflicts:
	main/php_content_types.c
2014-07-03 20:43:12 +02:00
Michael Wallner
deee0011e1 restore API compatibility 2014-07-03 20:40:41 +02:00
Michael Wallner
438b6c5258 finish 2014-07-03 20:40:40 +02:00
Michael Wallner
40bcd909d8 refactor php_stream_temp_create{,_ex} and use it for the php://input stream 2014-07-03 20:40:40 +02:00
Michael Wallner
11e401ab59 refactor _php_stream_fopen_{temporary_,tmp}file() 2014-07-03 20:40:40 +02:00
Michael Wallner
04c6a5b377 fix length overflow of HTTP_RAW_POST_DATA 2014-07-03 20:40:40 +02:00
Xinchen Hui
21ccbbad7d Fixed segfault if empty POST 2014-07-03 23:58:21 +08:00
Dmitry Stogov
0a77dcd4b9 Removed EG(in_execution). If EG(currentent_execute_data) is not NULL we are executing something. 2014-07-03 01:02:25 +04:00
Dmitry Stogov
63c057e331 Removed EG(opline_ptr) and use corresponding value from EG(current_execute_data) 2014-07-02 23:29:53 +04:00
Dmitry Stogov
4b09dd69e6 Removed EG(active_op_array) and use corresponding value from EG(current_execute_data) 2014-07-02 22:03:21 +04:00
Dmitry Stogov
2777662694 Hide warning message after fatal errors 2014-06-20 13:31:43 +04:00
Dmitry Stogov
5152422194 Check if socket is still alive 2014-06-20 13:31:23 +04:00
Dmitry Stogov
b108267f2c Merge branch 'master' into phpng
* master: (41 commits)
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  NEWS
  Fix Request #67453 Allow to unserialize empty data.
  Update copyright year to 2014
  Update copyright year for re2c generated files
  Update copyright year to 2014
  Update copyright year for re2c files as well
  Fix patch for bug #67436
  fix failed test
  Fix test on modern distro where old unsecure algo are disabled in openssl config. Testing recent algo should be enough to check this function.
  Added tests for bug 67436
  Fixed wrong XFAIL test - already fixed
  Fix typo in Bug #67406 NEWS entry
  Fix typo in Bug #67406 NEWS entry
  ...

Conflicts:
	Zend/zend_compile.c
	ext/session/session.c
	ext/standard/array.c
	ext/standard/http_fopen_wrapper.c
	tests/classes/bug63462.phpt
2014-06-18 17:50:27 +04:00
Adam Harvey
a92e3eb0fe Merge branch 'PHP-5.6'
* PHP-5.6:
  Keep 308-399 HTTP response codes when header('Location:') is called.
2014-06-12 17:42:29 -07:00
Adam Harvey
82231b5d89 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Keep 308-399 HTTP response codes when header('Location:') is called.
2014-06-12 17:40:51 -07:00
Adam Harvey
aa3a5f7681 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Keep 308-399 HTTP response codes when header('Location:') is called.
2014-06-12 17:38:52 -07:00
Adam Harvey
1b9cbab9a7 Keep 308-399 HTTP response codes when header('Location:') is called.
Fixes bug #67428 (header('Location: foo') will override a 308-399 response
code).
2014-06-12 17:35:05 -07:00
Julien Pauli
a6e0751079 5.5.15 now 2014-06-11 10:21:26 +02:00
Stanislav Malyshev
979eed5c6b 5.4.31 next 2014-06-10 23:03:40 -07:00
Xinchen Hui
922285ec55 Don't use cast (compiler friendly) 2014-05-26 11:05:04 +08:00
Xinchen Hui
59d74db108 Fixed segafult while stream is referenced by persistent resource (like dba) 2014-05-21 13:11:56 +08:00
Xinchen Hui
98f801ccbc Fixed resources apply_dtor 2014-05-19 14:53:02 +08:00
Xinchen Hui
d86fa38cc5 Fixed uninitialized used 2014-05-18 21:04:43 +08:00
Dmitry Stogov
16d3d5dc53 Fixed wrong comparisons 2014-05-15 21:06:39 +04:00
Pierre Joye
6ad1d7d831 forgot that hash uses ending 0 2014-05-15 10:39:35 +02:00
Pierre Joye
365446763f zend_hash_del>zend_hash_str_del 2014-05-15 10:16:19 +02:00
Julien Pauli
b4c92f31ad 5.5.14 now 2014-05-14 10:24:32 +02:00
Stanislav Malyshev
b1c944dfd2 5.4.30 next 2014-05-13 22:20:15 -07:00
Dmitry Stogov
7fcd4064c0 Merge branch 'master' into phpng
* master: (41 commits)
  fix test - output can be chunked
  fix test
  fix test
  Fixed test for commit 997be125eb
  Add bug fix to NEWS
  Update UPGRADING according to bug fix
  fix test
  improve CURL tests to allow testing without separate server
  improve CURL tests to allow testing without separate server
  Fixed bug #67199	mb_regex_encoding mishmash
  Fix bug #67248 (imageaffinematrixget missing check of parameters)
  Fix bug #67247	spl_fixedarray_resize integer overflow
  fix news
  add tests stuff to README
  Updated NEWS
  Fix Linux specific fail in error traces (cherry-picked and fix for bug #67245) Linux apparently does not like memcpy in overlapping regions...
  - Fixed off-by-one in phar_build (patch by crrodriguez at opensuse dot org)
  - Move checking
  - Fixed missing NULL check in SimpleXMLElement::xpath()
  - Fixed missing NULL check
  ...

Conflicts:
	ext/bz2/bz2.c
	ext/gd/gd.c
	ext/mbstring/php_mbregex.c
	ext/session/tests/031.phpt
	ext/simplexml/simplexml.c
	ext/spl/spl_fixedarray.c
2014-05-13 15:24:40 +04:00
Xinchen Hui
5ce6c33f65 Test push (previous push didn't send mail?) 2014-05-10 11:19:21 +08:00
Xinchen Hui
beb042090d Added smart_string to avoid string duplicated
for now, if we want result a char * use smart_string, if zend_string
 use smart_str
2014-05-10 11:09:17 +08:00
Xinchen Hui
88c550a799 Added vstrpprintf strpprintf to avoid duplicate string
(the function name maybe improvement)
2014-05-10 00:21:49 +08:00
Xinchen Hui
c242518bf0 There should been memory leaks(and don't use pointer cast) 2014-05-08 15:20:13 +08:00
Xinchen Hui
2393000aeb Prefer the macro we defined 2014-05-07 17:06:27 +08:00
Xinchen Hui
ed5b6af8af Refactored filter 2014-05-07 16:52:58 +08:00
Xinchen Hui
8b90b17c8d Merge branch 'phpng' of git.php.net:php-src into phpng 2014-05-07 13:50:53 +08:00
Xinchen Hui
9ef21b7606 Refactor fileinfo 2014-05-07 13:50:29 +08:00
Pierre Joye
38c886a449 -- missing length declaration, may have worked w/some gcc as length is not used in the macro but still need it, ifdef just make code uncertain. will get opt out anyway if not used 2014-05-07 07:31:21 +02:00
Michael Wallner
86b6bfb9b7 fix bug #67198 (php://input regression) 2014-05-06 12:22:08 +02:00
Michael Wallner
7308d47c4b fix bug #67198 (php://input regression) 2014-05-06 12:21:43 +02:00
Xinchen Hui
d8651fbe1c Make they are in the same style of Z_ISREF 2014-05-03 16:08:58 +08:00
Nikita Popov
e0247de147 zend_stack_top() now returns pointer directly 2014-05-01 09:08:30 +02:00
Nikita Popov
5a03efe279 Don't allocate zend_stack elements individually
Instead allocate a vector of elements. Size must now be specified
on initialization rather than on push.
2014-05-01 09:08:29 +02:00
Dmitry Stogov
17d027ed47 Split IS_BOOL into IS_FALSE and IS_TRUE 2014-04-30 18:32:42 +04:00
Dmitry Stogov
f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Anatol Belski
60f976a45e Merge branch 'PHP-5.6'
* PHP-5.6:
  fix dll export
2014-04-24 10:53:31 +02:00
Anatol Belski
9280e25534 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix dll export
2014-04-24 10:52:59 +02:00
Anatol Belski
acfed1c4c7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix dll export
2014-04-24 10:52:22 +02:00
Anatol Belski
03be983398 fix dll export 2014-04-24 10:51:42 +02:00
Dmitry Stogov
7584ae3200 Fixed compilaation warnings 2014-04-22 18:52:59 +04:00
Dmitry Stogov
72c287bd23 Combine HashTable.flags and HashTable.nApplyCount into single 32-bit word 2014-04-21 18:25:34 +04:00
Stanislav Malyshev
dd9c80e44b Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix bug #65701: Do not use cache for file file copy
2014-04-20 15:27:55 -07:00
Stanislav Malyshev
774f16318b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #65701: Do not use cache for file file copy
2014-04-20 15:27:39 -07:00
Stanislav Malyshev
5addf223d5 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #65701: Do not use cache for file file copy
2014-04-20 15:25:03 -07:00
Boro Sitnikovski
a18cec1b86 Fix bug #65701: Do not use cache for file file copy 2014-04-20 15:22:44 -07:00
Stanislav Malyshev
1d34d82231 5.4.29 is next 2014-04-15 16:51:38 -07:00
Julien Pauli
b8d029435d 5.5.12RC1 setup 2014-04-15 17:57:27 +02:00
Dmitry Stogov
050d7e38ad Cleanup (1-st round) 2014-04-15 15:40:40 +04:00
Ferenc Kovacs
fb326bbd9b Merge branch 'PHP-5.6'
* PHP-5.6:
  fix typo
2014-04-13 01:57:49 +02:00
Ferenc Kovacs
51cbb85ea9 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix typo
2014-04-13 01:57:15 +02:00
Ferenc Kovacs
2876bde634 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix typo
2014-04-13 01:56:47 +02:00
Ferenc Kovacs
5a0da281e5 fix typo 2014-04-13 01:55:55 +02:00
Bob Weinand
eae0f529f2 Merge branch 'PHP-5.6' 2014-04-12 23:55:35 +02:00
Bob Weinand
53b1dce587 Merge branch 'PHP-5.5' into PHP-5.6 2014-04-12 23:54:57 +02:00
Bob Weinand
9302be3754 Merge branch 'PHP-5.4' into PHP-5.5 2014-04-12 23:54:29 +02:00
Bob Weinand
edd90e5ae3 Made usage of php_hash_environment useful by updating instead of just adding argc 2014-04-12 23:53:21 +02:00
Xinchen Hui
180de35bce Refactor libxml (incompleted) 2014-04-11 18:07:25 +08:00
Dmitry Stogov
3d17219cd8 Refactored zend_hash_* iteration API zend_hash_fove_forward_ex(ht, pos) and family require second argument to be real pointer.
&(ht)->nInternalPointer should be passed instead of NULL.
zend_hash_update_current_key() may work only with internal pointer.
2014-04-07 23:14:17 +04:00
Dmitry Stogov
76cc99fe60 Refactored ZVAL flags usage to simplify various checks (e.g. Z_REFCOUNTED(), candidate for GC, etc) 2014-04-03 15:26:23 +04:00
Michael Wallner
8d4ee1dbed Merge branch 'PHP-5.6'
* PHP-5.6:
  NEWS
  NEWS
  Fix Bug #66736 	fpassthru broken
2014-04-03 10:41:53 +02:00
Michael Wallner
55005c8638 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  Fix Bug #66736 	fpassthru broken
2014-04-03 10:41:24 +02:00
Michael Wallner
bbd25ca01f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix Bug #66736 	fpassthru broken
2014-04-03 10:40:20 +02:00
Michael Wallner
d08b4dbf23 Fix Bug #66736 fpassthru broken 2014-04-03 10:40:06 +02:00
Michael Wallner
4d412421df Merge branch 'PHP-5.6'
* PHP-5.6:
  NEWS
  NEWS
  Fixed bug #61019 (Out of memory on command stream_get_contents)
2014-04-02 15:39:16 +02:00
Michael Wallner
68c57f8149 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  Fixed bug #61019 (Out of memory on command stream_get_contents)
2014-04-02 15:38:35 +02:00
Michael Wallner
f453917f62 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #61019 (Out of memory on command stream_get_contents)
2014-04-02 15:37:50 +02:00
Michael Wallner
1ec83d44a1 Fixed bug #61019 (Out of memory on command stream_get_contents) 2014-04-02 15:36:39 +02:00
Dmitry Stogov
d8099d0468 Changed data layout to allow more efficient operations 2014-04-02 14:34:44 +04:00
Michael Wallner
1d6b3f1293 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix bug #64330
2014-04-02 11:11:39 +02:00
Michael Wallner
669459da8c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #64330
2014-04-02 11:11:23 +02:00
Michael Wallner
af147ac9b7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #64330
2014-04-02 11:10:59 +02:00
Michael Wallner
91a9d24aa3 Fix bug #64330
stream_socket_server() creates wrong Abstract Namespace UNIX sockets
2014-04-02 11:09:26 +02:00
Dmitry Stogov
6b2ed577fd Avoid unnecessry reallocations 2014-04-01 22:36:17 +04:00
Dmitry Stogov
ea85451b65 Refactored data structures to keep zend_object* instead of a whole zval in some places 2014-03-28 02:11:22 +04:00
Yasuo Ohgaki
08cd3c6146 Merge branch 'PHP-5.6'
* PHP-5.6:
  Remove unneeded string copy. Allow to set ''(empty string values) internal/input/output_encoding for better compatibility. i.e. Runtime INI value changes. More compliance to the RFC. Improve/add encoding handling tests. i.e. Rather than set encoding automagic way, detect it.
2014-03-27 17:21:23 +09:00
Yasuo Ohgaki
a84e5dc37d Remove unneeded string copy.
Allow to set ''(empty string values) internal/input/output_encoding for better compatibility. i.e. Runtime INI value changes.
More compliance to the RFC. Improve/add encoding handling tests. i.e. Rather than set encoding automagic way, detect it.
2014-03-27 17:20:57 +09:00