Uh oh!
There was an error while loading. Please reload this page.
Fix bug #54379 PDO_OCI: UTF-8 output gets truncated - #59
Conversation
It will probably need fixes/tweaks, especially with the given DSN at line 12
kissifrot
commented
May 5, 2012
Added test. |
cjbj
commented
May 9, 2012
I scanned the change quickly. The code looks delicate. It defines the new size in terms of a utext (a short) which is intended for utf-16. If this sizing code is the root cause of the crash, I would have expected the patch to use oratext or text with some character set multiplication factor. The test uses the wrong number of args to putenv() so it will fail. It hardcodes the connection string and char set. It should also have a skipif if the DB char set is not UTF8. |
kissifrot
commented
Jul 5, 2012
Which patch? |
lstrojny
commented
Jan 14, 2013
Can you squash the commit? |
gureedo
commented
Dec 11, 2013
It is not quite right solution.
There is also another one caveat: NCHAR, NVARCHAR2, NCLOB types. Before transferring data to client Oracle converts data from such columns to NLS_NCHAR character set (if it is defined). Look here for details: http://docs.oracle.com/cd/A84870_01/doc/server.816/a76966/ch2.htm#94684 I see here two ways.
But i don't know what to do with NLS_NCHAR. |
gitgitcode
commented
Jan 23, 2014
use oci function cast() like this : |
cofirazak
commented
Dec 28, 2016
Can anyone clarify the status of this bug? |
php-pulls
commented
Jan 1, 2017
Comment on behalf of krakjoe at php.net: Since this PR has merge conflicts, seems to have been abandoned by author, and seems like a questionable solution, I'm closing this PR. If the author is watching and feels I am wrong, please open a clean PR, and start a discussion on internals. |
kissifrot
commented
Jan 1, 2017
Well the original PR was more a quick hack than a real fix. |
Comprehensive performance optimization of TrueAsync API to eliminate expensive EG(exception) checks in hot execution paths by refactoring function signatures from void to bool and replacing exception-based error handling with direct return value checks. Key changes: - Updated function typedefs: zend_async_event_del_callback_t, zend_async_event_stop_t, zend_async_event_dispose_t (void→bool) - Refactored zend_async_callbacks_remove to return bool - Updated all del_callback, stop, and dispose function implementations with proper return values - Fixed forward declarations compatibility issues - Optimized all function call sites to use if (!function()) return false; pattern instead of EG(exception) checks - Applied optimization to ~80 functions across coroutine, scope, curl, and libuv reactor modules Performance impact: Replaces expensive exception checks with fast boolean operations in critical async execution paths.
Changed return types from void to bool for three functions to match header declarations: zend_async_internal_context_set: - Returns false when coroutine == NULL - Returns true on successful context setting zend_coroutine_call_switch_handlers: - Returns true when no handlers exist or execution succeeds - Preserves existing handler cleanup logic zend_async_add_main_coroutine_start_handler: - Returns false when duplicate handler detected - Returns true on successful handler addition
I can test a Windows build ogf PHP with that fix if needed.