I know that the oracle database has two character sets: NLS_NCHAR_CHARACTERSET and NLS_CHARACTERSET .
I installed them as:
NLS_CHARACTERSET WE8MSWIN1252 NLS_NCHAR_CHARACTERSET UTF8
when i create the database.
I am also creating a use of my table NVARCHAR not VARCHAR , so it is assumed that it will be saved using UTF8 :
ID NUMBER EMAIL NVARCHAR2(255) USER_NAME NVARCHAR2(255) POST_AT DATE CONTENTS NVARCHAR2(255)
However, I cannot get the correct results. When I insert strings containing Japanese characters, it simply prints out like "???" when I check it on the terminal.
I do not know why it does not work. Does anyone know a method to solve this problem?
Also, if I don't care how it is stored in the database, just want to get the correct output after retrieving from the database, is there any way to decode it correctly? (I tried several methods for encoding conversion, but did not work)
I am using PHP OCI8 to access the database. oracle database version is oracle 11gR2 for linux.x64
source share