lib/generators/paper_trail/install_generator.rb
# Even modern versions of MySQL still use `latin1` as the default character
# encoding. Many users are not aware of this, and run into trouble when they
# try to use PaperTrail in apps that otherwise tend to use UTF-8. Postgres, by
# comparison, uses UTF-8 except in the unusual case where the OS is configured
# with a custom locale.
#
# - https://dev.mysql.com/doc/refman/5.7/en/charset-applications.html
# - http://www.postgresql.org/docs/9.4/static/multibyte.html
#
# Furthermore, MySQL's original implementation of UTF-8 was flawed, and had
# to be fixed later by introducing a new charset, `utf8mb4`.
#
# - https://mathiasbynens.be/notes/mysql-utf8mb4
# - https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html
#
Even modern versions of MySQL still use `latin1` as the default character
encoding. Many users are not aware of this, and run into trouble when they
try to use PaperTrail in apps that otherwise tend to use UTF-8. Postgres, by
comparison, uses UTF-8 except in the unusual case where the OS is configured
with a custom locale.



Furthermore, MySQL's original implementation of UTF-8 was flawed, and had
to be fixed later by introducing a new charset, `utf8mb4`.


Even modern versions of MySQL still use ` latin1 ` as the default character encoding . Many users are not aware of this and run into trouble when they try to use PaperTrail in apps that otherwise tend to use UTF - 8 . Postgres by comparison uses UTF - 8 except in the unusual case where the OS is configured with a custom locale . Furthermore MySQL ' s original implementation of UTF - 8 was flawed and had to be fixed later by introducing a new charset ` utf8mb4 ` .
def versions_table_options
      if mysql?
        ', { options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci" }'
      else
        ""
      end
    end
def versions_table_options if mysql? ', { options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci" }' else "" end end
Even modern versions of MySQL still use `latin1` as the default character
encoding.
Even modern versions of MySQL still use ` latin1 ` as the default character encoding .