I am basic small white database, PHP is also a novice. Now when accessing the Oracle database remotely with PDO, the header is in Chinese and the results are not available when queried. For example $sql=select * from AAA where station number = 1234; Return is undefined index ...
Solving... Thank you, guys.
Reply to discussion (solution)
Is your watch a file name in Chinese?
Print query Results when no filter is available (fragment is available)
Is your watch a file name in Chinese?
Print query Results when no filter is available (fragment is available)
The table name is in English, and guessing might be a character set problem. Simplified Chinese_china is displayed after executing select USERENV (' language ') from dual. Zhs16gbk
A result was printed with Print_r:
Array
(
[ID] = 7883
[???] = 3
[??] = =?
[????] = 0
)
What do you do, big God?
Oh, I'm asking the wrong question.
Your field name is obviously Chinese, this is very troublesome.
You'd better change the field name to English at the console.
Oh, I'm asking the wrong question.
Your field name is obviously Chinese, this is very troublesome.
You'd better change the field name to English at the console.
Can't change the big God, this library is not mine, and already put into use, want to change people also can't agree. How to do ah ...
How did your DSN write it?
New PDO (' oci:dbname=//server name or ip:1521/instance name; CHARSET=ZHS16GBK ', ' username ', ' password ');
This must have
Because your field name is Chinese, the character set must not be mistaken.
If you want the page to be utf-8, then you can only read and then Transcode.
If you change the name of the Chinese text to Latin, you can change the charset to get the corresponding encoded data.
How did your DSN write it?
New PDO (' oci:dbname=//server name or ip:1521/instance name; CHARSET=ZHS16GBK ', ' username ', ' password ');
This must have
Because your field name is Chinese, the character set must not be mistaken.
If you want the page to be utf-8, then you can only read and then Transcode.
If you change the name of the Chinese text to Latin, you can change the charset to get the corresponding encoded data.
Add this sentence CHARSET=ZHS16GBK the result! Thank you for the guide!
The owner again ask a question, I want to transfer the query results to UTF8 MySQL, transcoding is which function ah?