If a boat would run diesel powered submerged not only would the fumes affect the crew it would use all of the oxygen. Admiral Karl Doenitz supplied the U Boats with snorkels toward the end of WWII.
That innovation allowed the U Boats to use diesel power underwater,but it was too late to save them!
Well they all did, until the advent of SSBNs! Diesel electric boats would only use diesel on the surface, and run electric submerged,to try to run diesel submerged would have caused fumes,as did the electric,but when a boat was under attack they had to dive and switch!
But the Holland boats were conventional internal combustion-electric!
Diesel engines were not invented until 1911!