Red Abiera
Red Abiera

Reputation: 1

Ñ characters not saving/showing in columns in PHP 7/PROPEL2.0/Oracle 11g

Im newbie using Propel ORM and specially Oracle, cause im used in MYSQL

The Ñ in database(Oracle11g) not showing when I'm saving or querying in PROPEL ORM 2.0

The column type in Oracle is NVARCHAR2

Here is the data in oracle

Here is the result

Pls help. Im so depressed :(. I've been finding solutions for this issue for a month. Thank you very much

Upvotes: 0

Views: 119

Answers (1)

Christopher Jones
Christopher Jones

Reputation: 10721

The PHP Oracle drivers don't have good support for the NVARCHAR or NCLOB types (see questions like Inserting into NVARCHAR column type using PHP Oracle).

The solution is to stop using NVARCHAR2 columns. Use a DB with base character set of AL32UTF8 and put your data in VARCHAR2 columns. You can check the base character set of the DB by running SELECT value AS db_charset FROM nls_database_parameters WHERE parameter = 'NLS_CHARACTERSET';

Also make sure you are initializing PHP with the correct "client side" character set, e.g. like $dbh = new PDO('oci:dbname=localhost/orclpdb;charset=AL32UTF8', ... );

Upvotes: 1

Related Questions