In This MO question, Werner said that Hecke operator "changes" characters. I'm looking for any explicit theory of this kind, about Hecke operator with characters.

Actually, there are somewhat explicit example I found, for $\Gamma_{0}(4)$. Define $\chi:\Gamma_{0}(4)\to \mathbb{C}^{\times}$ as $\chi(T)=\chi(R)=e^{2\pi i/8}, \chi(-I)=1$, where $$ T=\begin{pmatrix}1&1\\0&1\end{pmatrix}, R=\begin{pmatrix}1&0\\4&1\end{pmatrix}, -I=\begin{pmatrix}-1&0\\0&-1\end{pmatrix} $$ which are generators of $\Gamma_{0}(4)$. Now let $f$ be a weight 0 modular form on $\Gamma_{0}(4)$ with character $\chi$, i.e. it satisfies $$ f(z+1)=e^{2\pi i /8}f(z), \,\,\,\,f\left(\frac{z}{4z+1}\right)=e^{2\pi i/8}f(z). $$ Now define $g(z)$ as $$ g(z)=f(3z)+f\left(\frac{z}{3}\right)+e^{10\pi i/8}f\left(\frac{z+1}{3}\right)+e^{4\pi i /8}f\left(\frac{z+2}{3}\right) $$ which is something looks like $T_{3}f$. Then with some tedious computations, I found that $$ g(z+1)=e^{6\pi i /8}g(z),\,\,\,\,g\left(\frac{z}{4z+1}\right)=e^{6\pi i /8}g(z) $$ holds. I just want to ask for any known results similar to this example.

Miyake's book about modular forms mentioned about Hecke operator with character and his Hecke operator does not changes character. But it assumes that the character can be extended to some bigger set multiplicatively, but the book doesn't give any necessary or sufficient conditions for this. For example, it is possible to define Hecke operator $T_{p}$ if we can extend the character $\chi:\Gamma_{0}(N)\to \mathbb{C}^{\times}$ to the bigger set $$\Gamma_{0}(N)\cup\Gamma_{0}(N)\begin{pmatrix}1&0\\0&p\end{pmatrix}\Gamma_{0}(N)$$ multiplicatively.

**EDIT** : To show the functional equation of $g$, I just computed a lot. The first one is not much complicated : we have
\begin{align}
g(z+1)&=f(3z+3)+f\left(\frac{z+1}{3}\right)+\zeta_{8}^{5}f\left(\frac{z+2}{3}\right)+\zeta_{8}^{2}f\left(\frac{z+3}{3}\right) \\
&=\zeta_{8}^{3}\left[f(3z)+f\left(\frac{z}{3}\right)+\zeta_{8}^{5}f\left(\frac{z+1}{3}\right)+\zeta_{8}^{2}f\left(\frac{z+2}{3}\right)\right] \\
&=\zeta_{8}^{3}g(z)
\end{align}
where $\zeta_{8}=e^{2\pi i /8}$. Second one is too long to write here..