Tag Archives: encoding

Why when add <?xml version=“1.0” encoding=“utf-8”?> to web page don´t work on hosting?

Questions: I am developing a simple webpage at hostgator.com. I have the standard headers, but when I add the following line: <?xml version=”1.0″ encoding=”utf-8″?> the page does not work. I would like why. This is the full header: <?xml version=”1.0″ encoding=”utf-8″?> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1 /DTD/xhtml1-strict.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml” lang=”es” xml:lang=”es”> …… Read More »

PHP Fatal error when trying to access phpmyadmin mb_detect_encoding

Questions: Not sure what happened, but below is what the log is giving me when trying to access phpmyadmin, please help. Trying to debug a different problem and ran into this. Not really possible to revert back to when it was working. PHP Fatal error: Call to undefined function mb_detect_encoding() in /usr/share/php/gettext/gettext.inc on line 177… Read More »

UTF-8 encoding for subject in contact form email

Questions: On this sites Website Link contact form I need to send the subject for email in UTF-8. Where in the code we need to do declare the UTF-8 encoding? kontakt.php: <? require_once “php/sendmail.class.php”; $sendmail = new sendMail(); if ($_SERVER[‘REQUEST_METHOD’] == ‘POST’) { $sendmail->setParams($_POST); $sendmail->parseBody(); $sendmail->setHeaders(); if ($sendmail->send()) { header(‘Location: kontakt.php?success=1’); } } ?> sendmail.class.php:… Read More »

Character encoding not declared in html document

Questions: I have a file that I am getting a very weird error on. The error is: The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must… Read More »

http_build_query() without url encoding

Questions: Is there a way to use http_build_query() without having it URL encode according to some RFC standard? Why I don’t want to URL encode everything: I’m querying the Ebay API.. They honestly insist on parameter names not being URL encoded, as far as commas in parentheses. E.g. DomainName(0) is a parameter, and the query… Read More »

jquery support Transfer-Encoding:chunked? how

Questions: i’m a web developer. in my script use header() to set “Transfer-Encoding:chunked”. and flush() to webpage. it will print in webpage time-shared. it works ok. but, when i use jQuery.ajax() to request this.it always output all together(chunked unuseful). how to solute this? use chunked encoding in jQuery ajax? Answers:

Character encoding issue with PDO_ODBC

Questions: When accessing a Microsoft SQL Database from PHP using PDO_ODBC with the following code, I have an encoding issue. When outputed the text from the DB is garbled. $dsn = “odbc:DRIVER={SQL Server};SERVER=$hostname;DATABASE=$database;charset=UTF-8”; $pdo = new PDO($dsn,$username,$password); $sql = “SELECT text FROM atable”; $result = $PDO->query($sql); while($data = $result->fetchObject()){ $values[] = $data->text; } dpm($values); garbled… Read More »