The main objective consists in generalizing a well-known Itô formula of J. Jacod and A. Shiryaev: given a càdlàg process S, there is an equivalence between the fact that S is a semimartingale with given characteristics ( B k , C , ν ) and a Itô formula type expansion of F ( S ) , where F is a bounded function of class C 2 . This result connects weak solutions of path-dependent SDEs and related martingale problems. We extend this to the case when S is a weak Dirichlet process. A second aspect of the paper consists of discussing some untreated features of stochastic calculus for finite quadratic variation processes.