init_charset example

$message .= '<p>' . sprintf(
                /* translators: %s: Support forums URL. */
                __( 'If you are unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href="%s">WordPress support forums</a>.' ),
                __( 'https://wordpress.org/support/forums/' )
            ) . "</p>\n";

            $this->bail( $message, 'db_connect_fail' );

            return false;
        } elseif ( $this->dbh ) {
            if ( ! $this->has_connected ) {
                $this->init_charset();
            }

            $this->has_connected = true;

            $this->set_charset( $this->dbh );

            $this->ready = true;
            $this->set_sql_mode();
            $this->select( $this->dbname, $this->dbh );

            return true;
        }
Home | Imprint | This part of the site doesn't use cookies.