|
130 | 130 | $termchar = $record['LgRegexpWordCharacters']; |
131 | 131 | $splitEachChar = $record['LgSplitEachChar']; |
132 | 132 | $rtlScript = $record['LgRightToLeft']; |
133 | | - mysql_free_result($res);$appendtext=array(); |
| 133 | + mysql_free_result($res); |
| 134 | + $appendtext=array(); |
| 135 | + $sid=array(); |
| 136 | + $sqlarr=array(); |
134 | 137 | if ($splitEachChar) { |
135 | 138 | $textlc = preg_replace('/([^\s])/u', "$1 ", $textlc); |
136 | 139 | } |
|
144 | 147 | $string= ' ' . ($splitEachChar?preg_replace('/([^\s])/u', "$1 ", $record['SeText']):$record['SeText']) . ' '; |
145 | 148 | $txtid =$record['SeTxID']; |
146 | 149 | $sentid =$record['SeID']; |
147 | | - $last_pos = strripos ( $string , $textlc ); |
| 150 | + $last_pos = mb_strripos ( $string , $textlc , 0, 'UTF-8'); |
148 | 151 | $sentoffset = preg_match('/[^' . $termchar . ']/ui', mb_substr($string,1,1, 'UTF-8')); |
149 | 152 | while($last_pos!==false){ |
150 | 153 | $matches=array(); |
151 | 154 | if($splitEachChar || preg_match ( $notermchar, $string, $matches, 0, $last_pos - 1)==1){ |
152 | | - $string = substr ( $string, 0, $last_pos ); |
| 155 | + $string = mb_substr ( $string, 0, $last_pos, 'UTF-8' ); |
153 | 156 | $cnt = preg_match_all('/([' . $termchar . ']+)/u',$string,$ma); |
154 | 157 | $pos=2*$cnt+$record['SeFirstPos'] + $sentoffset; |
155 | 158 | $txt=''; |
|
162 | 165 | } |
163 | 166 | else $appendtext[$pos]=$splitEachChar?$wis:$matches[1]; |
164 | 167 | } |
165 | | - $last_pos = strripos ( $string , $textlc ); |
| 168 | + $last_pos = mb_strripos ( $string , $textlc , 0, 'UTF-8' ); |
166 | 169 | } |
167 | 170 | else{ |
168 | | - $string = substr ( $string, 0, $last_pos ); |
169 | | - $last_pos = strripos ( $string , $textlc ); |
| 171 | + $string = mb_substr ( $string, 0, $last_pos, 'UTF-8' ); |
| 172 | + $last_pos = mb_strripos ( $string , $textlc , 0, 'UTF-8' ); |
170 | 173 | } |
171 | 174 | } |
172 | 175 | } |
|
304 | 307 | <table class="tab2" cellspacing="0" cellpadding="5"> |
305 | 308 | <tr title="Only change uppercase/lowercase!"> |
306 | 309 | <td class="td1 right"><b>New Term:</b></td> |
307 | | - <td class="td1"><input <?php echo $scrdir; ?> class="notempty" type="text" name="WoText" id="wordfield" value="<?php echo tohtml($term); ?>" maxlength="250" size="35" /> <img src="icn/status-busy.png" title="Field must not be empty" alt="Field must not be empty" /> |
| 310 | + <td class="td1" style="border-top-right-radius:inherit;"><input <?php echo $scrdir; ?> class="notempty" type="text" name="WoText" id="wordfield" value="<?php echo tohtml($term); ?>" maxlength="250" size="35" /> <img src="icn/status-busy.png" title="Field must not be empty" alt="Field must not be empty" /> |
308 | 311 | </td></tr> |
309 | 312 | <?php print_similar_terms_tabrow(); ?> |
310 | 313 | <tr> |
|
0 commit comments