Answers.Body: <p>This may be a bug, and is probably worth reporting to P&amp;T.</p>
  
  <p>However, it's very difficult (if not impossible) for them to account for every potential ASCII character mapping for every possible language. For that reason, there is a <a href="https://craftcms.com/docs/config-settings#customAsciiCharMappings" rel="nofollow">customAsciiCharMappings</a> config setting, which you can use as a workaround.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-30T22:31:50.737Z
Answers.Text: Ok I'll report it. For now I just lowercase the string before passing it to the normalize method to get the correct result.
Answers.UserDisplayName: oncode
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-30T17:08:20.283Z
Answers.LastActivityDate: 2016-06-30T17:10:10.520Z
Answers.LastEditDate: 2016-06-30T17:10:10.520Z
Answers.UserDisplayName: Lindsey D
Body: <p>The <code>StringHelper::normalizeKeywords()</code> doesn't work as I expected.</p>
  
  <p>When I normalize <code>überblick</code> it leads to the expected result:</p>
  
  <pre><code>StringHelper::normalizeKeywords('überblick') -&gt; ueberblick
  </code></pre>
  
  <p>But when I normalize <code>ÜBERBLICK</code> I expect it also to be <code>ueberblick</code> but it actually returns <code>überblick</code>.</p>
  
  <p>It could be fixed by adding the missing ASCII mappings (e.g. 196 => 'Ae') to the <code>StringHelper::getAsciiCharMap()</code> method or converting the string to lowercase before replacing the characters in <code>StringHelper::normalizeKeywords()</code> on lines 358 - 362:</p>
  
  <pre><code>-&gt; switch these two lines:
  
  // Remove punctuation and diacritics
  $str = strtr($str, static::_getCharMap());
  
  // Normalize to lowercase
  $str = StringHelper::toLowerCase($str);
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-06-30T16:53:07.373Z
Comments.Text: This sounds like a bug... I'd recommend reporting this directly to support@craftcms.com
Comments.UserDisplayName: Lindsey D
Tags: <search><string>
Title: Normalizing Keywords Bug
ThreadText: # Normalizing Keywords Bug
  
  (Asked by: username_0 on 2016-06-30)
  
  The `StringHelper::normalizeKeywords()` doesn't work as I expected.
  
  When I normalize `überblick` it leads to the expected result:
  
  ```
  StringHelper::normalizeKeywords('überblick') -> ueberblick
  
  ```
  
  But when I normalize `ÜBERBLICK` I expect it also to be `ueberblick` but it actually returns `überblick`.
  
  It could be fixed by adding the missing ASCII mappings (e.g. 196 => 'Ae') to the `StringHelper::getAsciiCharMap()` method or converting the string to lowercase before replacing the characters in `StringHelper::normalizeKeywords()` on lines 358 - 362:
  
  ```
  -> switch these two lines:
  
  // Remove punctuation and diacritics
  $str = strtr($str, static::_getCharMap());
  
  // Normalize to lowercase
  $str = StringHelper::toLowerCase($str);
  
  ```
  
  **Tags:** search, string
  
  > **Comments:**
  > **username_1**: This sounds like a bug... I'd recommend reporting this directly to support@craftcms.com  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-06-30. Score: 1 | Accepted answer
  
  This may be a bug, and is probably worth reporting to P&T.
  
  However, it's very difficult (if not impossible) for them to account for every potential ASCII character mapping for every possible language. For that reason, there is a [customAsciiCharMappings](https://craftcms.com/docs/config-settings#customAsciiCharMappings) config setting, which you can use as a workaround.
  
  > **Comments:**
  > **username_0**: Ok I'll report it. For now I just lowercase the string before passing it to the normalize method to get the correct result.  
  
  ---
  
  