A method to determine the charge of nuclei with nuclear emulsions