The solitary confinement part is quite harsh, I've never understood how that is supposed to rehabilitate someone.
In France there's early release, parole, etc. so real time he spends behind bars might be as low as two years.
Edit: The WP article is actually a very interesting read, https://en.wikipedia.org/wiki/Libyan_financing_in_the_2007_F...
In this case it's for his own wellbeing, because it's probably difficult for a former president to go along well with the rest of the prison population. I also read a statement that it would help prevent other inmates taking and publicly sharing pictures of him (since some inmates do manage to have phones even if they are forbidden).
Prison in general is one of the worst ways to rehabilitate someone though, I do agree with you.