» tagged pages
» logout

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

W3C I18n FAQ: Using character entities and NCRs

W3C I18n FAQ: What are character entities and NCRs, and when should I use them?

XML: del.icio.us/tag/xml

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

MySQL - Sending Non-ASCII Text to MySQL

This chapter provides tutorial notes on sending non-ASCII text data to MySQL. Topics include sending non-ASCII text data in SQL statements; changing MySQL character set settings to send Latin1, UTF-8, BGK, and Big5 characters.

User:mark1048: Building Chinese Web Sites using PHP

MySQL - Character Set and Encoding

This chapter provides tutorial notes on character set and encoding in MySQL. Topics include defining text columns with specific character set encodings; encoding conversions performed by MySQL on SQL statements and result sets; fetching non-ASCII characters in UTF-8 encoding.

User:mark1048: Building Chinese Web Sites using PHP

Chinese Characters in PHP String Literals

This chapter provides tutorial notes on Chinese characters in PHP string literals. Topics include PHP string literal syntax; testing Chinese character strings with UTF-8, GB18030, and Big5 encodings.

User:mark1048: Building Chinese Web Sites using PHP

Good practice: XML and character encodings

"In general, a representation provider SHOULD NOT specify the character encoding for XML data in protocol headers since the data is self-describing."

XML: del.icio.us/tag/xml

Good practice: XML and character encodings

"In general, a representation provider SHOULD NOT specify the character encoding for XML data in protocol headers since the data is self-describing."

W3C: Del.icio.us W3C Tags

String sanitization in Python | Nathan Ostgard

Somehow I didn't know about the 'xmlcharrefreplace' option for encoding Unicode strings.

XML: del.icio.us/tag/xml

Page 1 | Next >>