Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL error when uploading an asset with emoji in the filename #3601

Closed
arifje opened this issue Jan 8, 2019 · 1 comment
Closed

SQL error when uploading an asset with emoji in the filename #3601

arifje opened this issue Jan 8, 2019 · 1 comment

Comments

@arifje
Copy link

arifje commented Jan 8, 2019

When uploading an asset file that contains emoji characters, a SQL error will be returned.

Example file: 🦄.txt

Upload failed. The error message was: “SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\xA6\x84' for column 'title' at row 1
The SQL being executed was: INSERT INTO `craft_content` (`elementId`, `siteId`, `title`, `field_shortDescription`, `dateCreated`, `dateUpdated`, `uid`) VALUES (257, 1, '🦄', NULL, '2019-01-03 21:28:38', '2019-01-03 21:28:38', 'e66348b8-8352-4f21-8836-afed2fb4bd15')”

screen shot 2019-01-08 at 9 53 05 am

  • Craft version: 3.0.36
  • PHP version: 7.0.32
  • Database driver & version: Mysql Ver 14.14 Distrib 5.7.24
@brandonkelly brandonkelly changed the title Asset filename containing emoticons / special chars generate SQL error during upload SQL error when uploading an asset with emoji in the filename Jan 8, 2019
@bramus
Copy link

bramus commented Feb 21, 2019

Adding a mention of #2527 here, as that's the root cause of this issue ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants