Not the coding of documents does not have to be with the language, the language only processes and sends a processed file back to the user, when the connection with the bank is something that by default is configured in the bank and not in PHP.
The configuration of the database depends entirely on what the developer will want to do, here is an answer on the subject, although the photo is PHP in it is valid for any language that is Web-oriented (ie it generates pages):
Note that any version of PHP tries to maintain backward compatibility, so the new features of PHP7 do not necessarily make older scripts incompatible, unless you are using a function or class that has been previously discontinued.
To explain it better, in the case mysqli is an API that makes PHP access the mysql database that can be on a separate port or server, its only problem would be if you have been using functions that start mysql_
because they were part of the older API that was already outdated since PHP 5.5.0 and was only available up to 5.6 because of backwards compatibility. Now in version 7.0.0 + it has been removed and scripts written using it will no longer work.
Configuring the charset in the database
Even if you do this (PDO):
$conn = new PDO('mysql:host=HOST;dbname=BANCO;charset=utf-8', 'USUARIO', 'SENHA');
$conn->exec('SET CHARACTER SET utf8');//Define o charset como UTF-8
Or this (mysqli):
$mysqli->set_charset('utf8')
It does not mean that you are configuring PHP, you are actually sending an instruction to the bank so that it returns how the results were requested.
In the case of banks a traditional php and web page will consist of 4 important things:
- HTTP Server (apache, nginx, IIS, etc.)
- PHP language that interprets scripts and returns as a response
- database
- Scripts
.php
you wrote:
All 4 must have the necessary encoding settings:
- HTTP server: can be resolved in httpd.conf or .htaccess, although you use
header('Content-Type: ...');
of PHP itself already solves, that is, you only need to configure for static files (which may actually be optional)
- PHP language: set
header('Content-Type: ...');
- Database: You should use the statement
SET CHARACTER SET ...
or $mysqli->set_charset('...')
to say what you expect
- Scripts% w_that you wrote: should be saved with the desired encoding, if it is UTF-8 use "UTF-8 without BOM", if latin1 or similar saves the scripts as ANSI or windows-1252 or iso- 8859-1 or compatible.