When writing multithreaded applications, The most typical difficulties experienced is race circumstances.While utf8_decode is actually a handy Answer, I choose to appropriate the encoding errors around the desk alone.If other approach e.g. B turn out to be the winner, then B could change the value set by A right before system A reach it. If this oc