Probably the best way to find out would be to check the source code (search github for "listaccounts", and I'll do that once I get home, if you haven't beaten me to it!) However, in the meantime I can tell you that I've got account names with spaces, hyphens and periods as well as alphanumeric chars. None of my account names are that long - longest is 23 chars.
Cheers. I haven't touched C++ for years so I'm not the best person to check, but I couldn't see anything that restricts it.
I did however find something else very interesting while I was there... the 'vanity' param