Add variable manager and fix some unicode errors for R backend
Differential Revision: https://phabricator.kde.org/D13890