botblock / BotBlock.org

BotBlock - The List of Discord Bot Lists and Services
https://botblock.org/
Mozilla Public License 2.0
28 stars 8 forks source link

List string fields (owner etc.) don't support non-ascii chars #47

Closed MattIPv4 closed 4 years ago

MattIPv4 commented 4 years ago

Bug Report

Description

String fields within the list DB model don't support non-ascii chars and this means that any non-ascii char will cause the DB to fail to save the entry.

Steps to reproduce

  1. Have a valid list saved in the DB
  2. Edit the list and set the owners field to contain non-ascii chars, such as ᴀᴄᴋ
  3. Save the list and observe the error raised: Error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect string value

Expected behavior

Saves without error.

Logs or Screenshots

Error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect string value: '...' for column 'owners' at row 1

MattIPv4 commented 4 years ago

Evidently this was an issue with the DB being used in prod & staging, the DB was set to use the latin1 collation, not utf8mb4

MattIPv4 commented 4 years ago

This is now fixed.