1 min read

Unicode and ChezWEB

For a while, I used Unicode sparingly in my Scheme source code. On the one hand, it really is nice to work with when I have an extended character set for my code. On the other hand, editors that do not support Unicode and other tools can make things difficult.

Finally, I use ChezWEB for most of the new code that I write, and I had to figure out a good way to make the Unicode work with ChezWEB. Since ChezWEB generates TeX code, and normal TeX does not support Unicode, I had considered modifying the ChezWEB code to encode symbols into TeX directives.

Unfortunately, TeX does not have all of the character set of Unicode by default in its fonts, and I think it is a losing battle to try to special case the characters. On the other hand, I did find a successful solution. It turns out that simply switching the fonts and using XeTeX instead of TeX allows me to get Unicode support in ChezWEB without changing the code base at all.

So, you can use Unicode source in ChezWEB so long as you use a Unicode enabled TeX engine underneath.