Charge identification of fragments with the emulsion spectrometer of the FOOT experiment