We show that for a broad class of spaces X, the space Cp(X) of continuous real-valued functions on X equipped with the pointwise topology maps bijectively onto any separable infinite-dimensional Banach space with the weak topology. We prove that the inverse φ−1 of any continuous bijection φ:Cp(X)→(E,w), where X is an arbitrary infinite Tychonoff space and (E,w) is an arbitrary normed space with the weak topology, is everywhere discontinuous. This generalizes a recent result of Kania--K\k{a}kol and solves a problem raised by K\k{a}kol, Leiderman and Michalak by providing a complete classification of function spaces Cp(X) that are homeomorphic to Banach spaces with the weak topology.