For $[n,k]$ stabilizer code, we can prepare an encoded state by simply measuring an initial state $|0\rangle^{\otimes n}$ with the stabilizers $g_1, \dots ,g_{n-k}$ and fixing it according to the measurement result. However, this does not apply to encoding an unknown state $|\psi\rangle \in \mathcal{H}^{\otimes k}$.
Is there any systematic way to perform such encoding?