Invalid byte sequence error during install

Run the following command:

sudo dpkg-reconfigure locales

then select and enable en_US.UTF-8 UTF-8 and default it to en_US.UTF-8 on the next page.

after that, Run ./discourse-setup once again. this should be fixed.