Fixing Bridgetown on Cloudflare Page (v2)
If you’re building a Bridgetown site on Cloudflare Pages and encounter this error:
Exception raised: Encoding::UndefinedConversionError
"\xE2" from ASCII-8BIT to UTF-8
bridgetown-core-1.2.0/lib/bridgetown-core/url.rb:160:in `encode'
You can spend about a day trying to track down some errant character in a filename, or title, or somewhere.
You can try upgrading Bridgetown, upgrading Ruby, upgrading everything.
You can start deleting old posts or removing feed functionality etc.
Or you can find some obscure Jekyll bug and add the following environment variables to your Cloudflare Pages:
LC_ALL: "C.UTF-8"
LANG: "en_US.UTF-8"
LANGUAGE: "en_US.UTF-8"