i am writing to a oracle table using python script in spotfire. i am picking value from spotfire and inserting it to db using following part of script.
from Spotfire.Dxp.Data.Import import DatabaseDataSource, DatabaseDataSourceSettings, DataTableDataSource
objID = Document.Properties["OBJID"]
objectname = Document.Properties["ObjName"]
sqlIns = sqlIns + "insert into mytablename (OBJ_ID,OBJ_NAME) VALUES ('" + objID + "','" + objectname + "')"
print sqlIns
dbsettings = DatabaseDataSourceSettings( "System.Data.OracleClient","Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxx.com)(PORT=1530))(CONNECT_DATA=(SID=xxx)));User Id=xxxx;Password=xxx",sqlIns)
ds = DatabaseDataSource(dbsettings)
newDataTable = Document.Data.Tables.Add("temp",ds)
Document.Data.Tables.Remove(newDataTable)
This is working fine when values in OBJ_NAME is in English,when i am inserting OBJ_NAME in other languages such as korean data base is showing values like "¿¿¿¿¿¿ ¿¿¿ ¿ MD -¿¿¿". But when i printed above python code i can see that it displayed correct korean character. please see the image below.
But In oracle its not showing correctly. See screenshot of oracle table below
As data type of OBJ_NAME in oracle is Nvarchar ,if i insert this Korean value from oracle itself ,it will insert correct Korean character.