Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, I have the same problem. It seems it caused by fgetcsv function which is called from easy_table_str_getcsv function. Function fgetcsv uses system locale setting, so it depends how is it set on your site – try echo setlocale(LC_ALL, 0). Here is a fix which helped in my case, where system locale was set to “C”. I changed locale to specific value cs_CZ.UTF-8 just for the fgetcsv loop, it is set back after

    $option = get_option(‘easy_table_plugin_option’);
    $limit = !empty($option[‘limit’]) ? (int)$option[‘limit’] : 2000;
    $oldLocale = set_locale(LC_ALL, 0);
    setlocale(LC_ALL, ‘cs_CZ.UTF-8’);
    while (($data = @fgetcsv( $handle, $limit, $delimiter, $enclosure )) !== FALSE) {
    $num = count($data);
    for ($c=0; $c < $num; $c++) {
    $line++;
    $data[$c] = str_replace(‘NLINEBREAK’,”\n”,$data[$c]);
    $data[$c] = str_replace(‘RLINEBREAK’,”\r”,$data[$c]);
    $data[$c] = str_replace(‘_ESCAPED_SEPATATOR_’,$delimiter,$data[$c]);
    $return[$line] = $data[$c];
    }
    }
    fclose($handle);
    setlocale(LC_ALL, $oldLocale);
    return $return;

    It will make sense to experiment a bit with various system settings, or replace usage of fgetcsv with another solution (parsing csv isn’t so difficult to do it in code of plugin) not dependant on system locale setting.

    Plugin Author mnezerka

    (@mnezerka)

    This plugin has nothing to do with location of uploaded images. It’s main purpose is to generate “<a…><img…/>” tags in format easily readable by many lightbox-like javascript tools (LightBox, FancyBox, etc.)

Viewing 2 replies - 1 through 2 (of 2 total)