Ignore:
Timestamp:
Aug 3, 2021, 11:20:41 AM (3 years ago)
Author:
chronos
Message:
  • Modified: Used explicit types where possible for better error reporting.
  • Modified: Updated Common packaged to newer version.
  • Modified: Simplified pages title.
  • Added: Simple keyword based spam filter for meet items.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 nbproject
        2 Config.php
        31.settings
        42.project
        53.buildpath
         4.htaccess
  • trunk/Packages/Common/UTF8.php

    r55 r63  
    526526  }
    527527
    528   function ToUTF8($String, $Charset = 'iso2')
     528  function ToUTF8string(string $String, string $Charset = 'iso2'): string
    529529  {
    530530    $Result = '';
     
    540540  }
    541541
    542   function FromUTF8($String, $Charset = 'iso2')
     542  function FromUTF8(string $String, string $Charset = 'iso2'): string
    543543  {
    544544    $Result = '';
     
    546546    for ($I = 0; $I < strlen($String); $I++)
    547547    {
    548       if (ord($String{$I}) & 0x80) // UTF control character
     548      if (ord($String[$I]) & 0x80) // UTF control character
    549549      {
    550         if (ord($String{$I}) & 0x40) // First
     550        if (ord($String[$I]) & 0x40) // First
    551551        {
    552552          if ($UTFPrefix != '') $Result .= chr(array_search($UTFPrefix, $this->CharTable[$Charset]));
    553           $UTFPrefix = $String{$I};
     553          $UTFPrefix = $String[$I];
    554554        }
    555         else $UTFPrefix .= $String{$I}; // Next
     555        else $UTFPrefix .= $String[$I]; // Next
    556556      } else
    557557      {
    558558        if ($UTFPrefix != '') $Result .= chr(array_search($UTFPrefix, $this->CharTable[$Charset]));
    559559        $UTFPrefix = '';
    560         $Result .= $String{$I};
     560        $Result .= $String[$I];
    561561      }
    562562    }
Note: See TracChangeset for help on using the changeset viewer.