Fixes calendar encoding issues.

Re: #125.