OK, you have to RTFM (http://au2.php.net/manual/en/language.variables.basics.php) and then bang your head against the desk at the stupidity of PHP.
Non-breaking space (character \xa0) is a legal character in a variable name, so, if you are insane you could write code like
$user name = "Nicolas Martignoni";
echo 'This is the output of Moodle:<br />';
echo get_string('loggedinas', 'moodle', $user name);
Anyway, that explains why '$a »' does not work as expected. It is looking for a variable called '$a ' (a followed by non-breaking-space) which obviously does not exist.
The correct work-around is to define
$string['loggedinas'] = 'Connecté sous le nom « {$a} »';
That is, use curly braces to separate the variable from the following character, just like you would say
$string['distancerun'] = 'You have run {$a}km.';
to avoid referring to the variable $akm.
So, this is resolve not-a-bug, but translators need to be aware. I'll post in the Languages forum.
VIP watchers added.