I'm trying to decode an Ethernet II frame with type instead of length indication. Theoretically this should be done by receiving and storing the data between start of frame and interframe gap. However there is a very high chance that 12 zero bytes arise in any packet, so there must be some additional way of detecting the end of the packet. Is the PHY's capability of signaling an empty line through encoding is forwarded to the MAC by some MII signaling?
The interframe gap uses different transmissions, depending on the Ethernet variant. In the simplest way it's just loss of carrier. More advanced PHYs (Gigabit upward) use pause symbols on the medium.
You need to make the distinction of physical-layer (encoded) bits/symbols and MAC-layer (unencoded) bits. A series of zero bits on the MAC layer is never transmitted as a series of zeros on the physical layer - that would quickly cause desynchronization between transmitter and receiver. Therefore, EOF can only be detected by the PHY. On the MII level, the end of frame is signaled by deasserting RX_DV (Receive Data Valid) - check 802.3 Clause 188.8.131.52.