[PATCH] Move charsets-in-region to C