Doctrine 1
  1. Doctrine 1
  2. DC-1033

[PATCH] Use multibyte version of strtolower

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      PHP 5.3.7, Symfony 1.4.13

      Description

      While trying to develop a new Symfony frontend to an existing database - whcih unfortunately contains non-ascii character names - I ran into a lot of problems where non-ascii characters had been mangled.
      After installing XDebug and digging into the issue I found that the use of strtolower on the column names was the issue, since it's not safe to use on UTF-8 strings.
      I replaced all calls to strtolower with mb_strtolower and UTF-8 encoding which solved my issue. I don't know if that is the correct way of doing it or if there is a better way.
      I saw one other use of mb_strtolower in doctrine and it was guarded with an if function exists... Also it might be an issue in other files as well...
      I provide my patch file incase it is of any use.

        Activity

        Jonas Flodén created issue -

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Jonas Flodén
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: