Archivo de la etiqueta: utf-8
php screws up utf-8 charachters from mysql database using mysqli
I have some chinese characters (g. 中文(简体)) stored in a mysql database with content type utf8_bin.
I am pulling from the database with this code:
if($stmt = $mysqli->prepare("SELECT c_color FROM colors")){
$stmt->execute();
$stmt->bind_result($ccolor);
$stmt->store_result();
if($stmt->fetch()){
//$ccolor is filled with …
php display chinese characters SET NAMES 'utf8' no funciona
I’m trying to work with a database that I got but I can’t display chinese characters in it. The database was actually a MS Access file first, that I converted into mysql with a program. De todos modos, many rows have chinese… Sigue leyendo
Search tamil fonts in mysql and php
How to search tamil fonts and retrieve data from mysql and show the result using php?… Sigue leyendo
Código de texto (PHP, idiomas)
When I submit a post with AJAX that is not in English, I will get something similar to %u4F60%u662F%u5982%u4F55%u505A%uFF1F
What can I do to fix this in PHP? He tratado de utf8_decode… and doesn’t work.
I’m submitting the text with AJAX Sigue leyendo
Why is this preg_match() code returning true in PHP CLI and false in Apache
I’m trying to validate some Arabic text encoded in UTF-8 and running into unexpected results in PHP 5.3.8. Running the following snippet through CLI returns true and false through Apache.
var_dump(preg_match("/[[:alnum:]]/i", "عايش لهدف"));
…
I have mbstring.func_overload set to 7 y Sigue leyendo
MongoDB [MongoRegex] pregunta: trabajando en los resultados de localhost, pero vacío en el servidor
I use MongoRegex to find cities starting with first characters of users’s input:
$search = new MongoRegex('/^'.$_POST['search'].'/');
$results = iterator_to_array( $mongodb->cities->find(array('_id'=>$search)) );
…
On localhost (Ventanas) $results contains array of cities, but on server (Debian) $results is always = empty array. Sigue leyendo
UTF8 troubles in a php contact form
Here is my contact function :
public static function contact_anon()
{
$form = new Form('contact_anon');
$form->field('email', 'text', array
(
'max_length' => 45,
'valid_email' => true
));
$form->field('message', 'textarea', array
(
'max_length' => 400,
'min_length' => 25
));
if($data = $form->validate())
…
Charset temas almacenar datos RSS en una tabla de MySQL
At the moment I’m reading rss feeds that may be encoded in any character type, uso simplexml_load_file();…
These feeds are then looped through in php and some parts are inserted into a mysql database that is utf8 with all tables Sigue leyendo
Vuelva a colocar el carácter de un "Â con su entidad HTML ā
I’m having a really hard time trying to replace a certain character with it’s entity equivalent. I tried to str_replace the character “ā” but it just wont work! I can’t see why. The code I use:
$content = str_replace('ā', 'ā',$content);
…
Permitir que sólo (Inglés & Árabe) de códigos UTF-8
Estoy buscando una expresión regular para cambiar todos los no-Inglés y / o árabe en el guión “_”
Actualmente tengo el siguiente código que funciona, pero creo que tengo el mal unicode
variar, ya que permite chino & otros idiomas… Sigue leyendo





