Systematic investigation of projectile fragmentation using beams of unstable B and C isotopes