Unfortunately, the ASCII hat was tied to a limited-time event that has since ended, so it's no longer obtainable through normal means. If you're set on collecting it, your only hope is trading with another player who still owns one.