# [RFC] mbstring-ng

- Thread: https://externals.io/message/71291
- Original archive: https://news-web.php.net/php.internals/71291
- Started by Yasuo Ohgaki on 2014-01-20T03:10:35+00:00
- Messages: 3
- RFC: Alternative mbstring implementation using ICU (Declined) — https://externals.io/rfc/altmbstring.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #71291 — Yasuo Ohgaki — 2014-01-20T03:10:35+00:00

URL: https://externals.io/message/71291#71291

Hi all,

I would like to discuss RFC created at 2009 by Moriyoshi.

Alternative mbstring implementation using ICU
https://wiki.php.net/rfc/altmbstring

The reason behind of this RFC is library used by mbstring.
mbstring uses libmbfl for multibyte string handling and Oniguruma
for multibyte regular expression.

libmbfl is not used widely AFAIK. Oniguruma is used widely by Ruby, etc.
Issue for these libraries are license. They are LGPLed. As long as
PHP/mbstring or
embed SAPI is used as shared library, users are not affected by LGPL.
However,
if users compile their extension statically into PHP or use embed SAPI
statically,
they are affected by LGPL.

I would like to introduce mbstring-ng as a replacement of mbstring for PHP
6 and
move mbstring to PECL. It may be good to introduce work in progress
mbstring-ng
to PHP 5.6 as EXPERIMENTAL module for further development and testing.

There would be compatibility issues between mbstring-ng and mbstring due to
the
difference of used library. Even if there would be compatibility issues,
adoption of
mbstring-ng is better for future development. IMHO.

Any comments?

Regards,

--
Yasuo Ohgaki
yohgaki@ohgaki.net

---

## #71327 — Andrea Faulds — 2014-01-20T16:28:58+00:00

URL: https://externals.io/message/71291#71327 · In reply to: #71291

> Any comments?

Are there any locales or encodings which mbstring currently supports 
that ICU doesn't? It'd be best not to break existing applications...

-- 
Andrea Faulds
http://ajf.me/

---

## #71374 — Yasuo Ohgaki — 2014-01-21T01:50:52+00:00

URL: https://externals.io/message/71291#71374 · In reply to: #71327

Hi Andrea,



> 
>
> > […]
>
> Are there any locales or encodings which mbstring currently supports that
> ICU doesn't? It'd be best not to break existing applications...
>

AFIAK, mbstring supports some Japanese encodings that require special
handling.
It also supports special encodings like HTML entities, base64, etc.

These could be issue. Otherwise, I suppose there aren't. I have to check
them carefully, though.

ICU
http://demo.icu-project.org/icu-bin/convexp

mbstring
http://jp1.php.net/manual/en/mbstring.supported-encodings.php

Regards,

--
Yasuo Ohgaki
yohgaki@ohgaki.net
