Answer the question
In order to leave comments, you need to log in
Php+oracle problems with encoding, how to remove questions and output Cyrillic?
People, help, the whole brain has already turned over with this problem. There is a serv on orakle, there is an application on puff. Everything in Oracle is encoded in cp-866, in Cyrillic letters, I make a selection, I display it on the screen - on locales (win xp sp3, apache 2.2.25, php 5.4.29, mod_fcgid 2.3.6) everything is fine and the letters are displayed normally.
He asked me to raise a serv on a virtual machine in order to place the application there. Transferred everything there, only win 7 and the oracle client installed instantclient-basic-nt-12.1.0.1.0
Here troubles arose, instead of Russian symbols it displays question marks. Changing the page encoding in the browser did not help (the default page encoding is win1251),
iconv($str,'CP866','CP-1251') Doesn't work, although the function worked fine on my locale. That is, numbers and signs are read normally, and Russian letters are replaced with questions. mb_detect_encoding returns the ansii encoding. please help me to find out and solve the problem
Answer the question
In order to leave comments, you need to log in
Check the encoding:
1. The NLS_LANG parameter of the oracle client (in the registry, edit the handles, because it defaults to 1252)
2. When creating a connection, explicitly specify the base encoding
There is a problem in the Apache code, by default there is something like AddDefaultCharset UTF-8,
in fact, this caused me the same problem with some sites cp866
In Oracle, everything is contained in cp-866 encoding, in Cyrillic letters
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question