Also set mb_regex_encoding.
Also set mb_regex_encoding.

This fixes issues with corrupt bytes when you change the default
encoding and use regular expressions.

Fixes #3800

petteyg/cakephp,dakota/cakephp,tgr0ss/cakephp,khoimt/cakephp-study,cakephp-fr/cakephp,cakephp-fr/cakephp,bravo-kernel/cakephp,garethellis36/cakephp,adopico/cakephp,ADmad/cakephp,akintoey/cakephp,eboominathan/cakephp,eboominathan/cakephp,elboletaire/cakephp,jjj117/cakephp,ionas/cakephp,gmponos/cakephp,garethellis36/cakephp,tgr0ss/cakephp,CVO-Technologies/cakephp,mvdriel/cakephp,web-player/cakephp,erikfig/cakephp,jeffblack360/cakephp,kumamidori/cakephp,justinyost/cakephp,thinkingmedia/cakephp,cakephp/cakephp,HavokInspiration/cakephp,ndm2/cakephp,timhoeppner/cakephp,tenkoma/cakephp,dkarvounaris/cakephp,ndm2/cakephp,mvdriel/cakephp,eryw/cakephp,dkarvounaris/cakephp,CakeDC/cakephp,ionas/cakephp,jeffblack360/cakephp,kumamidori/cakephp,kumamidori/cakephp,tenkoma/cakephp,Phillaf/cakephp,ADmad/cakephp,tisu2tisu/cakephp,adopico/cakephp,petteyg/cakephp,tisu2tisu/cakephp,CakeDC/cakephp,dkarvounaris/cakephp,timhoeppner/cakephp,CakeDC/cakephp,eryw/cakephp,et304383/passbolt_api,bravo-kernel/cakephp,berrygoudswaard/cakephp,dakota/cakephp,yinhe007/cakephp,gmponos/cakephp,nrother/cakephp,elboletaire/cakephp,bravo-kernel/cakephp,michaelze/cakephp,et304383/passbolt_api,nrother/cakephp,tenkoma/cakephp,gmponos/cakephp,justinyost/cakephp,michaelze/cakephp,davidyell/cakephp,burriko/cakephp,pbaire/cakephp,Balachan27/cakephp,cakephp/cakephp,et304383/passbolt_api,jjj117/cakephp,davidyell/cakephp,erikfig/cakephp,thinkingmedia/cakephp,ionas/cakephp,adopico/cakephp,Balachan27/cakephp,et304383/passbolt_api,yinhe007/cakephp,mvdriel/cakephp,cakephp/cakephp,garethellis36/cakephp,jjj117/cakephp,ndm2/cakephp,berrygoudswaard/cakephp,burriko/cakephp,pbaire/cakephp,ADmad/cakephp,petteyg/cakephp,eboominathan/cakephp,web-player/cakephp,jerems02/cakephp,akintoey/cakephp,ADmad/cakephp,pbaire/cakephp,HavokInspiration/cakephp,thinkingmedia/cakephp,michaelze/cakephp,eryw/cakephp,tgr0ss/cakephp,yinhe007/cakephp,burriko/cakephp,jerems02/cakephp,cakephp-fr/cakephp,davidyell/cakephp,CVO-Technologies/cakephp,tisu2tisu/cakephp,timhoeppner/cakephp,garethellis36/cakephp,Phillaf/cakephp,Phillaf/cakephp,ndm2/cakephp,et304383/passbolt_api,petteyg/cakephp,HavokInspiration/cakephp,khoimt/cakephp-study,jerems02/cakephp,web-player/cakephp,Balachan27/cakephp,erikfig/cakephp,elboletaire/cakephp,akintoey/cakephp,dakota/cakephp,CVO-Technologies/cakephp,mvdriel/cakephp,cakephp/cakephp,khoimt/cakephp-study,jeffblack360/cakephp,CakeDC/cakephp,dakota/cakephp,justinyost/cakephp,nrother/cakephp,tenkoma/cakephp,berrygoudswaard/cakephp