vtigercrm 6.x や F-RevoCRM でデータ作って保存しようとしたらいきなり "Illegal escape sequence 'u'" エラーが出てそれ以降表示しても保存しても何度もエラーが出てきて本当に邪魔。というとき。
同梱されている Zend Framework のライブラリが古いからこうなってる。チョチョイと書き換えて対応しよう。
include\Zend\Json\Decoder.php
を開いて、以下の行を見つける
$this->_source = $source;
$this->_sourcelength = strlen($source);
コレを以下のように書き換える。
$this->_source = self::decodeunicodestring($source);
$this->_sourcelength = strlen($this->_source);
同ファイルの最下部に、decodeunicodestring と _utf162utf8 関数を用意する。この関数は、以下リンク先に添付の Decode.zip 内 Decode.php にある関数のコードをそのままコピペすれば良い。
i18n issue with Zend Framework (#42) | Issues | vtiger / vtigercrm | Vtiger
以上で完了。エラー出なくなってホッ。