sscanf has locale things that make it include implementation-defined behaviour, doesn't it?
Anything that isn't C.UTF-8 is totally broken anyway.
Case in point: echo y | LANG=lv_LV.UTF-8 grep '[a-z]'