In general, one encoding character S for Greek sigma is sufficient; it is interpreted as a final sigma at the end of words or when followed by punctuation, and as a medial sigma in other positions.
The use of one encoding character S to represent Greek sigma is context-dependent; it signifies a final sigma at the end of words or after punctuation marks, and a medial sigma in other situations.