oracle character set problem

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

oracle character set problem

Post 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.
Post Reply