-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Added test. |
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. |
Which patch? |
Can you squash the commit? |
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. |
use oci function cast() like this : |
Can anyone clarify the status of this bug? |
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. |
Well the original PR was more a quick hack than a real fix. |
I can test a Windows build ogf PHP with that fix if needed.