  In coding theory, constructing codes with good parameters is one of the most
important and fundamental problems. Though a great many of good codes have been
produced, most of them are defined over alphabets of sizes equal to prime
powers. In this paper, we provide a new explicit construction of $(q+1)$-ary
nonlinear codes via algebraic function fields, where $q$ is a prime power. Our
codes are constructed by evaluations of rational functions at all rational
places of the algebraic function field. Compared with algebraic geometry codes,
the main difference is that we allow rational functions to be evaluated at pole
places. After evaluating rational functions from a union of Riemann-Roch
spaces, we obtain a family of nonlinear codes over the alphabet
$\mathbb{F}_{q}\cup \{\infty\}$. It turns out that our codes have better
parameters than those obtained from MDS codes or good algebraic geometry codes
via code alphabet extension and restriction.
