News Feed
Sections




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

Vinu Thomas' Blog:
mbstring Functions by default in PHP
July 18, 2008 @ 07:57:16

In a new post to his blog, Vinu Thomas talks about a set of functions that can make your life easier when handling unicode strings - the mb_* methods of the mbstring extension.

When dealing with multiple languages and internalization in PHP, some of the default functions in PHP end up mangling up the unicode characters in PHP. This is evident when you have a lot of funny looking characters coming up on your web page instead of the actual characters. [...] There is an extensions called mbstring which you can install in PHP which gives you a set of functions which are unicode ( actually multibyte ) ready.

He mentions some of the replacements like mb_send_mail instead o fmail and mb_strlen instead of the usual strlen. Thankfully, there's a simple way to make use of these functions without having to replace a lot of code - a setting in your php.ini (mbstring.func_overload) that tells your application to seamlessly replace things behind the scenes.

0 comments voice your opinion now!
mbstring function utf8 unicode multibyte replace


blog comments powered by Disqus

Similar Posts

The Northclick Blog: A comma is a comma is a comma...or is it?

Matthew Weir O'Phinney's Blog: exuberant ctags with PHP in Vim

PHPEasy.co.uk: Sorting array data using SplMaxHeap

Eirik Hoem's Blog: Dying with grace - PHP's register_shutdown_function

Brandon Savage's Blog: Bug-Free: Using Function Traces To Better Understand Code (Part 3 of N)


Community Events





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


laravel install list voicesoftheelephpant release deployment podcast symfony package api framework series opinion language community interview library tips introduction bugfix

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