I was having some issues today with character encoding and I thought I’d post about it. There are three elements that you need to make sure you have if you want to properly use UTF-8 character encoding in your Cake app. My issue was that I did not have #2, although adding #1 didn’t hurt either.
1. Database Config
Add ‘encoding’ => ‘utf8′ to app/config/database.php
var $default = array( 'driver' => 'mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'user', 'password' => 'password', 'database' => 'database', 'encoding' => 'utf8' );
2. Make sure your layout has the charset line in the
<head> <?php echo $html->charset(); ?> Other elements... </head>
3. This one is set by default, but make sure App.encoding is set in app/config/core.php
/**
* Application wide charset encoding
*/
Configure::write('App.encoding', 'UTF-8');
And thats it!

About a year ago Rick (http://www.rickguyer.com) had me read the book Getting Things Done by David Allen. In his book, Allen teaches you how to use his strategies and procedures on managing your tasks (or actions) in a very organized and well thought out fashion. His strategy is unique and calls for a very unique tool to accompany his GTD system. When I originally read his book, Rick and I spent several days searching for a different program, service, or web app that would allow us to incorporate Allen’s GTD system in an electronic fashion. After a solid week of effort I gave up after finding nothing that I felt was easy to use and completely GTD compliant.
Finally, after over a year, we decided to create this perfect GTD compliant web service that will help people, like us, be able to incorporate Allen’s system and become more productive. Peep! is “a simple and easy-to-use tool to help you focus and start getting things done.” I highly suggest you all try it and let me know what you think.
Head over to http://trypeep.com and get started today!
Shailesh N. Humbad had some really quick, simple, and useful code snippets on their website on how to provide trim() functionality (like PHP’s trim) in Javascript. Check out his Javascript Trim LTrim and RTrim Functions. My favorite application of his examples is as follows:
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g,"");
}
trimmedString = string.trim();
Thanks for your work on this Shailesh. You made my life easier
We’ve been working hard at the office lately in efforts to launch a new application that will be aimed towards increasing one’s productivity. The app will follow the principles in the book Getting Things Done by David Allen. Check out the sneak peek below!

Rick (from rickguyer.com) and I played around with Google Friend Connect today. It appears that Google is attempting to turn the entire internet into a single, gigantic Facebook or Myspace. I like where they are going with the idea but I think it needs quite a bit of polishing still. I have installed it for you to play with as well (see right side bar). Please leave comments and let me know what you think. For more information on Google Friend Connect check out Google’s site.