Broken page with emoji in source #345

Closed
opened 2026-02-04 18:46:59 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @zizzfizzix on GitHub (May 31, 2017).

  • BookStack Version: 0.16.2
  • PHP Version: 7.1
  • MySQL Version: mysql Ver 15.1 Distrib 10.0.30-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Used snippet
class ErrorHandler {
    static func handleError(code: Int) -> String {
        "Handle error with code: \(code) 😡".log()
        switch code {
        case 400:
            return "Invalid data!".localized
        case 401:
            FlowManager.logout()
            return "You are not authorized!".localized
        case 403:
            return "Access denied!".localized
        case 404:
            return "Not found!".localized
        default:
            return "Something went wrong! Please try again.".localized
        }
    }
}
Expected Behavior

Emoji in the page content

Actual Behavior

see:
screencapture-wiki-codeaddict-io-books-dev-playbook-page-error-handler-1496246314891

Originally created by @zizzfizzix on GitHub (May 31, 2017). * BookStack Version: 0.16.2 * PHP Version: 7.1 * MySQL Version: mysql Ver 15.1 Distrib 10.0.30-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 ##### Used snippet class ErrorHandler { static func handleError(code: Int) -> String { "Handle error with code: \(code) 😡".log() switch code { case 400: return "Invalid data!".localized case 401: FlowManager.logout() return "You are not authorized!".localized case 403: return "Access denied!".localized case 404: return "Not found!".localized default: return "Something went wrong! Please try again.".localized } } } ##### Expected Behavior Emoji in the page content ##### Actual Behavior see: ![screencapture-wiki-codeaddict-io-books-dev-playbook-page-error-handler-1496246314891](https://cloud.githubusercontent.com/assets/652460/26641835/13bf13d2-462c-11e7-8543-24cff53dcc67.png)
OVERLORD added the 🐛 Bug💿 Database🚀 Priority labels 2026-02-04 18:46:59 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jun 4, 2017):

@zizzfizzix Thanks for reporting, TIL that the default UF8 MySQL charset will just cut off when encountering emoji.

In the next release, Will update the default MySQL collation to support emoji and will convert content-holding tables such as the pages, books, revisions and chapters.

@ssddanbrown commented on GitHub (Jun 4, 2017): @zizzfizzix Thanks for reporting, TIL that the default UF8 MySQL charset will just cut off when encountering emoji. In the next release, Will update the default MySQL collation to support emoji and will convert content-holding tables such as the pages, books, revisions and chapters.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#345