encoding regex fix