[PATCH] utf8 flag support on perl lib

Tomash Brechko tomash.brechko at gmail.com
Sun Jan 13 07:55:06 UTC 2008


On Sun, Jan 13, 2008 at 00:24:50 +0100, Peter J. Holzer wrote:
> I'm not sure if I understand what you mean by getting any encoding to
> work.

I was meaning "use encoding 'enc';", I see now it will work too.


> So we can do something like this:
> 
> in set:
>     if (utf8::is_utf8($val)) {
> 	utf8::encode($val);
> 	$flags |= F_UTF
>     }
> 
> in get:
>     if ($flags & F_UTF8) {
> 	utf8::decode($val) or die "oops!";
>     }

Thanks, will do it this way.


-- 
   Tomash Brechko


More information about the memcached mailing list