public function clean($value)
  {
    // Return null for empty strings.
    if ($value==='' || $value===null || $value===false)
    {
      return null;
    }

    // Replace all ambiguous characters.
    $tmp = $value;
    foreach ($this->ambiguities as $unambiguity => $ambiguities)
    {
      foreach ($ambiguities as $ambiguity)
      {
        // Note: str_replace works fine with multi byte characters like UTF-8.
        $tmp = str_replace($ambiguity, $unambiguity, $tmp);
      }
    }

    // Restore EOL for DOS users.
    if (PHP_EOL!="\n") $tmp = str_replace("\n", PHP_EOL, $tmp);

    // Return null for empty strings.
    if ($tmp==='') $tmp = null;

    return $tmp;
  }