Making WordPress.org


Ignore:
Timestamp:
04/07/2017 05:20:54 AM (8 years ago)
Author:
iandunn
Message:

Events: Fallback to a LIKE query for ideographic languages

MySQL < 5.7.6 doesn't support full-text queries for ideographic languages, like Japanese.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/events/1.0/tests/test-index.php

    r5276 r5277  
    305305        ),
    306306
    307         'city-endonym-non-latin-length-greater-than-4-asia' => array(
     307        'city-endonym-ideographic-asia1' => array(
    308308            'input' => array(
    309309                'location_name' => '白浜町宇佐崎南',
     
    319319        ),
    320320
    321         /*
    322          * @todo
    323          *
    324          * This is currently failing, but should pass. It looks like the value is in row 112931.
    325          */
    326         'city-endonym-non-latin-length-greater-than-4-asia2' => array(
     321        'city-endonym-ideographic-asia2' => array(
    327322            'input' => array(
    328323                'location_name' => 'تهران',
     
    338333        ),
    339334
    340         /*
    341          * @todo
    342          *
    343          * This is currently failing, but should pass. It looks like the value is in row 1174872
    344          */
    345         'city-endonym-non-latin-length-greater-than-4-asia3' => array(
     335        'city-endonym-ideographic-asia3' => array(
    346336            'input' => array(
    347337                'location_name' => 'كراچى',
     
    357347        ),
    358348
    359         /*
    360          * @todo
    361          *
    362          * This is currently failing, but it should pass. One reason it may be failing is that `ft_min_word_len`
    363          * is set to `4` and `東京` is only `2`.
    364          *
    365          * But, there are others that are failing that are >= 4, though, like `シラオカ`, `しらおか`, `Ширахама`, and
    366          *`すぎと,スギト`. So, there may be additional reasons too.
    367          */
    368         'city-endonym-non-latin-length-less-than-4-asia' => array(
     349        'city-endonym-ideographic-asia4' => array(
     350            'input' => array(
     351                'location_name' => '京都',
     352                'locale'        => 'ja',
     353                'timezone'      => 'Asia/Tokyo',
     354            ),
     355            'expected' => array(
     356                'description' => 'kyoto',
     357                'latitude'    => '35.021',
     358                'longitude'   => '135.754',
     359                'country'     => 'JP',
     360            ),
     361        ),
     362
     363        'city-endonym-ideographic-asia5' => array(
    369364            'input' => array(
    370365                'location_name' => '東京',
Note: See TracChangeset for help on using the changeset viewer.