Escape beyond-BMP characters correctly in gencs