Fix 383

Sophomorix doesn't use standard encoding names, so this patch translates correctly
between sophomorix names ans standard names (at least for perl).
The same encoding is used for reading and writing a file, so this fixes unwanted encoding changes
during reading and writing cycle.