Page 1 of 1

oracle character set problem

Posted: Thu Feb 21, 2008 8:09 am
by yacahuma
I am trying to read spanish data from oracle. And I get strange characters in my php application.

After reading this oracle manual I finally understand the reason of the problem.

http://www.oracle.com/technology/tech/g ... c110410553

In very simple terms. You never specify the character set of the database. What you need to specify is the character set of the client. That way oracle know if convertion needs to be made.

It was very simple to test when my client is a sqlplus windows term. But what Is the character set of apache running under oracle zend core in solaris? Is it the character set of the machine? The documentations says that if I dont specify an NLS_LANG the client will use the NLS_LANG of the database. What is really confusing at this point is that, I think, that oracle(machine 1) and zend core(machine 2) are both using iso 8859-1. So why do I still get the funny characters?

What part of the recipe am I missing?

Usually you never worry about this things if your php application in the one writing and reading. I this case the data was writing by an external process.