• Home
  • Blog
  • Lifestream
  • Me
  • Twitter

Recent Posts

  • » Google Car - Damn I'm Observant
  • » Travelling - What's Next?
  • » Posh East Perth Apartment
  • » House in Perth
  • » House Sitting in Adelaide
  • » Sailing The Whitsundays
  • » Agnes Water / 1770
  • » Fraser Island
  • » Coomera Springs and Noosa
  • » Byron Bay

Tags

  • 365  australia  code  experiences  explore  flickr  france  function  holiday  house  javascript  misc  movie  perth  photo  photography  photos  php  random  rant  review  ski  skiing  thailand  traveling  travelling  trekking  video  work 

Search


Links

  • » 365 Gallery
  • » Twitter
  • » Lifestream
  • » My Flickr

Archives

  • » January 2010 (1)
  • » November 2009 (2)
  • » August 2009 (2)
  • » June 2009 (2)
  • » May 2009 (5)
  • » April 2009 (6)
  • » March 2009 (4)
  • » February 2009 (1)
  • » January 2009 (2)
  • » December 2008 (3)
  • » November 2008 (2)
  • » October 2008 (2)
  • » September 2008 (5)
  • » August 2008 (3)
  • » July 2008 (1)
  • » June 2008 (2)
  • » April 2008 (10)
  • » March 2008 (7)
  • » February 2008 (5)
  • » January 2008 (9)
  • » December 2007 (2)

 RSS Feed

Search results for 'encoding'

Unicode Encoding

March 5th, 2008
Ok, so recently i've been making all my web pages support unicode character sets, one of the tasks is ensuring all output is encoded in utf-8. Anyway to make a long story short, using the ob_get_contents() function i showed you a few posts ago, gives you output in whatever character set the file is saved as, and no matter what you do you cant get the blasted thing to display as utf-8... so there are a few methods of fixing this...

My first attempt being php's iconv() function to convert all the output into utf-8, however, this is just pants and you'd have to detect what format its in in the first place in order to recode it...

The other (and better) approach is just to ensure that all your pages are encoded in utf-8 to start with, with the IDE I use (Coda) you can set the default file encoding in the preferences, and i'm sure many other editors give you the same options.

Magic.
No Comments »
.
 
Twitter   |   Contact “everything should be made as simple as possible, but no simpler ” - Albert Einstein