News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Riff Blog:
Console encoding in PHP-GTK apps
November 20, 2006 @ 10:58:00

PHP-GTKers working in English-related applications, don't have a problem with debugging messages output to a console when debugging, but applications on a more international front have issues with their output. But help has been found in this new post on the Riff Blog - a method for correctly encoding PHP-GTK applications.

PHP scripts are typically stored under UTF-8 encoding to limit i18n headaches, while the console in which their output will be displayed is normally configured to some regional encoding, like IBM850 in Windows/XP French.

So we need a workaround...

He splits the process out into a few steps, each with its own explanation and code:

  • Builtin tools
  • Buffering
  • Flushing
  • PHP-GTK is not PHP for the Web
  • Auto-flushing
All wrapped up with a final solution - using the iconv functionality in combination with some output buffering to correctly display the message.

0 comments voice your opinion now!
phpgtk encoding output console i18n buffering iconv phpgtk encoding output console i18n buffering iconv


blog comments powered by Disqus

Similar Posts

Chris Hartjes' Blog: Screencast: Interactive Console for CakePHP

PHP-GTK Community Site: Accessing geo-nick with Zend Framework (Zend_XmlRpc_Client)

Chris Shiflett\'s Blog: Google XSS and Evil Character Encoding

SitePoint PHP Blog: How to Tidy Your WordPress Menu HTML

Sebastian Bergmann's Blog: The Cost of Test Isolation (and other PHPUnit Features)


Community Events

Don't see your event here?
Let us know!


opinion laravel community composer api language yii2 interview series framework example php7 list podcast symfony introduction application part2 programming project

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework