Share ideas, ask questions, and get feedback about developing for ProcessMaker
Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
#9516
Dear all

I use ProcessMaker-1.2-2985-windows version, when i stored some data into a oracle database, there is a problem, the chinese caharators became unknow charators in oracle database,
the following is the code of the trigger.

# insert info to orcale
$db = '4965515134c7b62cf504524047463965';
$caseid=@@APPLICATION;

$subject=str_replace("'","''",@@issueSubject);
$result = executeQuery("insert into PM_CaseInfo (Caseid,Subject) values('$caseid','$subject') ", $db);


for example, if $subject is "7777777中国", but in database it became "7777777涓浗浜烘皯"
i guess it's of encoding problem,
how can i set up to insert chinese charactors into Oracle?

by the way, the orcale charset is simplified-chinese

thanks very much

Pine
#9521
The problem is that ProcessMaker doesn't have an option to use a different character set when connecting to Oracle, so it gets encoded in the character set which ProcessMaker is using, which doesn't match the character set used by Oracle. A while back, I filed a new feature request for an option to be added to select the character set for Oracle databases. See: http://bugs.processmaker.com/view.php?id=4757

There are two workarounds:
1. You can use PHP's iconv() function to convert your strings to the character set used by your Oracle database, then use executeQuery() to do your insertion with the converted strings.
2. The other option is to connect to your Oracle database with PHP's oci_connect() which has a parameter to select the character set. Then use oci_parse() and oci_execute() to do insertions. Strings should get automatically converted to Oracle' s character set when inserted. (At least that is what the documentation says.) Frankly, I have never done it, so you will just have to experiment and see what works.

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]

What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]