5

This is a list of accented characters I have found here.

ÂÃÄÀÁÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ

I have used the Codeigniter function convert_accented_characters to convert accented characters to ASCII characters. However, it seems to fail for two characters (Þ and þ), see output:

AAAeAAAAECEEEEIIIIDjNOOOOOeOUUUUeYÞssaaaaaeaaeceeeeiiiidjnoooooeouuuueyþy

How can I extend this array to account for these two characters.

Would this change be adequate?

'/п/Þ/þ' => 'p', at line 88? I am not familiar with those characters and what language they are from!

Abs
  • 56,052
  • 101
  • 275
  • 409

1 Answers1

5

You should add this code

'/Þ|þ/' => 'th',
'/п/' => 'p',

to the array in file application/config/foreign_chars.php

This array is used to define transliteration

Þ or þ are coming from the Icelandic alphabets. Are replaced with the digraph th in english

п is from Cyrillic alphabet and translate in english as p

Alessandro Minoccheri
  • 35,521
  • 22
  • 122
  • 171