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

neRok’s picture

I 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.

neRok’s picture

Issue summary: View changes

Fix typos

Version: 7.14 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.