<?php
public function singleRepresentation($str)
{
// dynamically requiring file of phputf8 library,
// as it is only required if this function is
// called
require_once 'utf8/utils/ascii.php';
return utf8_decode(utf8_accents_to_ascii($str));
}
?>
Problem is!
utf8/utils/ascii.php contains global variables
$UTF8_LOWER_ACCENTS & $UTF8_UPPER_ACCENTS which
when required by a function become local to that
function!
Resulting in problems for utf8_accents_to_ascii()
that can no longer locate the variables it needs.
The solution is to change:
<?php
$UTF8_LOWER_ACCENTS = array(...);
?>
to
<?php
$GLOBALS['UTF8_LOWER_ACCENTS'] = array(...);
?>
If the bug is still difficult to understand have a look
at http://forums.devnetwork.net/viewtopic.php?p=315239
Harry Fuecks
UTF-8 Utils (./utils)
<= 0.3
Public
|
Date: 2006-10-25 20:09 Logged In: YES |
|
Date: 2006-10-16 20:40 Logged In: YES |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2006-10-25 20:09 | harryf |
| close_date | - | 2006-10-25 20:09 | harryf |
| resolution_id | Accepted | 2006-10-16 20:40 | harryf |
| resolution_id | None | 2006-10-04 10:54 | harryf |
| assigned_to | nobody | 2006-10-04 10:54 | harryf |
| category_id | String Functions | 2006-10-04 10:54 | harryf |
| artifact_group_id | None | 2006-10-04 10:54 | harryf |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use