Ignore:
Timestamp:
Oct 10, 2007, 12:43:09 AM (17 years ago)
Author:
rvelices
Message:
  • RSS feed is PWG charset
  • iptc are now converted from iso-8859-1 or utf-8 (automatic detection) to pwg charset
  • remove function get_language_filepath
  • load_language also checks for the default language
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_metadata.inc.php

    r1900 r2132  
    9090  $value = str_replace(chr(0x00), ' ', $value);
    9191
     92  if ( preg_match('/[\x80-\xff]/', $value) )
     93  {
     94    // apparently mac uses some MacRoman crap encoding. I don't know
     95    // how to detect it so a plugin should do the trick.
     96    $value = trigger_event('clean_iptc_value', $value);
     97    $is_utf8 = seems_utf8($value);
     98    $value = convert_charset( $value,
     99      $is_utf8 ? 'utf-8' : 'iso-8859-1',
     100      get_pwg_charset() );
     101  }
    92102  return $value;
    93103}
Note: See TracChangeset for help on using the changeset viewer.