Sets of divergence of Fourier series Carleson theorem (later extended by Hunt) states that given an $L^2$ function $f:{\mathbb R}/{\mathbb Z}\to{\mathbb C}$, the set of points $x$ where the Fourier series $$\lim_{n\to\infty}\sum_{k=-n}^n\hat f(k)e^{2\pi ik x}$$ does not converge to $f(x)$ has measure 0.
Kahane and Katznelson proved that given any measure zero set $E$ there is a continuous function $f:{\mathbb R}/{\mathbb Z}\to{\mathbb C}$ whose Fourier series diverges at all points of $E$. 
These two results leave a little gap. 
What is known about those sets $E$ for which there is an $L^2$ (or even continuous?) function $f$ whose Fourier series diverges at all points of $E$ and pointwise converges to $f$ at all points not in $E$? 
There is some ambiguity with the question as currently stated, as it depends on the representative of the $L^2$-class of $f$ that one chooses. I would hope an answer would help clarify the effect of specific representatives. Let me point out that, once we pick representatives, not every measure zero set can be such an $E$. If $f$ is continuous, this is easy to see; in fact, $E$ must be Borel (of low complexity; and this of course seems related to this question). As pointed out below in a comment by Juris Steprans, just on cardinality grounds we know not every measure zero set can appear, even for $L^2$ functions. Hunt's extension of Carleson's result says that we may assume $f\in L^p$ for any $p\in(1,\infty)$; I do not even know whether the sets $E$ will vary with $p$.
 A: I believe that the problem of characterizing the sets of divergence for classical Fourier series is more or less open for all interesting classes ($C$, $L^\infty$, $L^p$ with $p>1$).
The strongest result that I'm aware of is due to Buzdalin who showed that any null-set $E\in F_\sigma\cap G_\delta$ is a set of divergence for the Fourier series of some continuous complex-valued function ("Trigonometric Fourier series of continuous functions diverging on a given set", Math. USSR Sbornik, 24 (1974)).
The characterization problem is mostly solved however for several other orthogonal systems, including the Haar and Franklin systems. There is also a very recent paper by Karagulyan where it is proved, in particular, that

A necessary and suﬃcient condition for a set $E \subset [0, 1]$ to be a set of divergence
for the sequence of $(C, \alpha)$-means ($\alpha>0$) of the Fourier series of some function $f \in L^\infty[0, 1]$ is that $E$ is a $G_{\delta\sigma}$-set of measure $0$.

(See G.A. Karagulyan, "Characterization of the sets of divergence for sequences of operators with the localization property", Sbornik: Mathematics, 202 (2011), pp. 9–33.)

To complicate things further, people tend to distinguish between the sets of divergence and unbounded divergence.  A set $E \subset [0, 1]$ is said to be a set of divergence (resp. unbounded divergence) for a series of functions
$$\sum_{n=1}^{\infty}f_n(x),\qquad x\in[0,1],$$
if the series diverges  for $x ∈ E$ and converges for $x \in [0, 1] \backslash E$ (resp. diverges unboundedly for $x ∈ E$).
One may think of the two optimistic working conjectures.


*

*Every $G_{\delta\sigma}$-set $E $ of measure $0$  is a set of divergence for the Fourier series of some function $f \in C[0, 1]$.


*Every $G_{\delta}$-set $E$ of measure $0$  is a set of unbounded divergence for the Fourier series of some function $f \in C[0, 1]$.

Conjecture 2 was explicitly formulated by P.L. Ul'yanov in the late 1960s. Both conjectures seem to be open.
A: The set where a sequence $S_n$ of continuous functions (and in particular a Fourier series) converges is always an $F_{\sigma\delta}$, i.e. a countable intersection of countable unions of closed sets. 
