» tagged pages
» logout

sorted by: recent | see : popular
Content Tagged with character + utf8

blog.kfish.org: Survey: Haskell Unicode support

"This article outlines how to use Unicode in Haskell, and surveys three alternatives for character set conversion: iconv, utf8-string and encoding, providing working examples for each."

Haskell: del.icio.us tag/haskell

French Characters Not Rendering Correctly

Background Knowledge
The MySQL database v4.0.23 is using the default character set of “Latin1″. When the database was created I had no knowledge of character sets other wise it would have been “UTF-8″.
The web pages are using a character set of “UTF-8″.

Problem
Data being queried from a MySQL database that contains French accent characters will not render correctly in the browser even after applying PHP htmlentities().

Example code: $string = htmlentities($string , ENT_QUOTES, “UTF-8″);

Solution
The queried data from the database was inputted using the character set “ISO-8859-1″. I found this out by changing the browser’s character encoding to “Western ISO-8859-1″ and the French accent characters then rendered properly. With the use of PHP iconv() I was able to convert the data from “ISO-8859-1″ to “UTF-8″ character set and the French characters then rendered properly in the browser.

Example code: $string = iconv(”ISO-8859-1″,”UTF-8″,”$string”);


If you are unaware of what MySQL default character set being used, you can run this SQL command “show variables like “%character%” and check your MySQL configuration file. Refer to the MySQL manual for further details.

MySQL: Planet MySQL

List of XML and HTML character entity references - Wikipedia, the free encyclopedia

In SGML, HTML and XML documents, the logical constructs known as character data and attribute values consist of sequences of characters, in which each character can manifest directly (representing itself), or can be represented by a series of characters c

XML: del.icio.us/tag/xml