You found a strange bug in calibre that has been lurking for many months. Character classes are not processed in unicode in compiled template functions, but *are* in interpreted template functions. Functions are interpreted when using the template editor. They are compiled for performance when used in composite columns.
I have submitted a fix that should be in the next release. In the meantime you can work around the problem by changing the tweak "Compile General Program Mode templates to Python" to False.
|