Skip to main content

Posts

Showing posts with the label utf-8

Android UTF-8 edittext not displayed

I want to display some UTF-8 characters (upside down) in my edittext: ʇxǝʇ ǝɯos This works for the all characters, except the e . The e can't be displayed in the edittext. Is there a reason why it can't be displayed? the "e" is of type LATIN_EXTENDED_B, can't android display those characters ? Thanks!

Korean characters not displaying when pulled from MS Access database using php

I have an Access DB which contains a load of people with Korean names. I hava a classic asp site (which i inherited) that reads data from the DB quite happily and displays it properly. I am now developing a different site in php, but it is unable to display korean characters at all. I have written two very simple scripts, one in asp and one in php to work out why. ASP: <% Response.CodePage = 65001 Set objLoginConn = Server.CreateObject("ADODB.Connection") objLoginConn.Provider = "Microsoft.Jet.OLEDB.4.0" objLoginConn.Open "C:\wwwroot\mydb.mdb" Set rs = Server.CreateObject("ADODB.Recordset") SQL = "SELECT firstname FROM mytable" rs.Open SQL, objLoginConn, 3, 3 while not rs.EOF response.write("<p>"& rs.fields("firstname").value &"</p>") rs.movenext wend %> PHP: <?php $con = new COM("ADODB.Connection") or die("Cannot start ADO"); $con->Open(&quo

Reading Unicode characters from MySQL with PHP

I've inherited a MySQL database which contains a field named Description of type text and collation of latin1_swedish_ci . The problem with this field is it contains utf-8 data with some Unicode characters, e.g. character 733, etc. Sometimes this character also exists in the field represented as HTML encoded "&#733" as well. I'm trying to read the table and export the data to a CSV file and I need to represent this character as a double quote. Reading the HTML encoded character is easy enough. However, it appears that the actual Unicode character is converted to utf-8 before I can do anything with it resulting in a "?". How do I read in the Unicode character 733 (U+02DD), recognize it and convert it? Here's a simplified (not tested) version of the code. <? $testconn=odbc_connect ("TESTLIB", "......", "......"); $query="SELECT Description FROM TestTable"; $rsWeb=mysql_query($query)); $WebRow=mysq

UTF-8 problems while reading CSV file with fgetcsv

I try to read a CSV and echo the content. But the content displays the characters wrong. Mäx Müstermänn -> Mäx Müstermänn Encoding of the CSV file is UTF-8 without BOM (checked with Notepad++). This is the content of the CSV file: "Mäx";"Müstermänn" My PHP script <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <?php $handle = fopen ("specialchars.csv","r"); echo '<table border="1"><tr><td>First name</td><td>Last name</td></tr><tr>'; while ($data = fgetcsv ($handle, 1000, ";")) { $num = count ($data); for ($c=0; $c < $num; $c++) {