Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm having an issue on a Spanish website. Whenever t() is called on a page that contains an accented character, it throws an error similar to this:
URL: /printmail/dailyword/protecci�n-tuesday-april-16-2013
General error: 1366 Incorrect string value: '\xF3n-tue...' for column 'location' at row 1
That URL is coming from request_uri() and causing an error when trying to insert the t() text into the locales_source table.
Full error:
[errorInfo] => Array
(
[0] => HY000
[1] => 1366
[2] => Incorrect string value: '\xF3n-tue...' for column 'location' at row 1
)
[query_string] => INSERT INTO {locales_source} (location, version, source, context, textgroup) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4)
[args] => Array
(
[:db_insert_placeholder_0] => /printmail/dailyword/protecci�n-tuesday-april-16-2013
[:db_insert_placeholder_1] => 7.14
[:db_insert_placeholder_2] => Protección - Tuesday, April 16, 2013
[:db_insert_placeholder_3] =>
[:db_insert_placeholder_4] => default
)
Maybe I'm missing something? For now, I've removed the t() call that is mainly having this issue (and the titles are already translated to Spanish)
Comments
Comment #1
neRok CreditAttribution: neRok commentedI think this is a duplicate of #1840434: URL aliases of non default language for nodes of that non default language don't work when URL language detection is disabled. It is definitely closely related.
Could you close this issue as duplicate if you agree.
Comment #1.0
neRok CreditAttribution: neRok commentedFix typos