Messed polygon when loading .egg, correct when loading .bam

I just went against a bug which made me busy for a while. When loading .egg files, like in every examples, or with pview, polygons get messed up and some matrix went singular. Everything was ok when loading a bam (like in GreetingCard).

I eventually found the cause of the problem, which i report here in the hope it can help other users in the future. Basically, i had a french locale ($LANG envvar), which made most ascii number wrongly parsed from the .egg files. Unsetting this variable made everything work again. Probably the parser use some glibc locale-dependant way to read the ascii egg file, i hope i can investigate further later…

Perhaps its the same problem that’s discussed here:

discourse.panda3d.org/viewtopic.php?p=1936#1936