Let $f(x) = 1_{[0,\pi]}$ where $f$ is defined on $(-\pi, pi]$. First, I'd like to compute the Fourier series of $f$. We have $$f(x) \sim \sum_{n \in \mathbb{Z}}\hat{f}(n)e^{inx}.$$ Then the Fourier coefficients of $f$ are: \begin{align*} \hat{f}(n) &= \frac{1}{2\pi}\int_{-\pi}^{\pi}1_{[0,\pi]}e^{-inx}\ dx\\ &= \frac{1}{2\pi}\int_{0}^{\pi}e^{-inx}\ dx\\ &= -\frac{1}{2\pi in}(e^{-in\pi} - 1)\\ &= \frac{i}{2\pi n}(\cos(n\pi) - 1) = \frac{i}{2\pi n}((-1)^n - 1) \end{align*} for $n \neq 0$. For $n = 0$, we have $\hat{f}(0) = \frac{1}{2}.$ As you can see, the Fourier coefficients are not real numbers for $n \neq 0$. I think this is incorrect. Or maybe I can still rewrite it so I get real valued Fourier coefficients. But I don't know how.
Further more, I was wondering where the points $(-\pi, \pi]$ converge to then? Is it true that the points will converge to $f$ for $x \in (0, \pi]$ and $x = 0$ will converge to $\frac{1}{2}$. I am not sure, because I have read from my textbook that if $f$ has a jump discontinuity at $x$, then the partial sums of the Fourier series will never converge to $f$.