• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
looking for the Ñ

hi there!.. problems again

if i set a charset=utf-8 i have the same problem of the first entry
so, ive change it to charset=iso-8859-1
and that was ok, but i was trying everything with strings of the db, that i have enter when i was with the utf-8

today i try enter something with ñ, like 'Feliz Año Nuevo', and when i checked for it and was 'Feliz A'
so the first thing i did was changing it to utf-8 back again, and that problem was solve

if i have the charset in utf-8 i cannot find the Ñ
if i have the charset in iso-8859-1 probably CI wont let me put the whole Title in to the DB

If you are using Pygons solution where you repalce the character with the html entity you need to do this during adding and updating too.

Which charset are you using for your database?

The db charset its wierdone, that my provider dont let me change, dont know why, but i dont have problems saving any character

well im trying to add a thing to the validation process and there change the 'ñ' to ñi did a MY_validation library

function latinchar($str)
    $str = str_replace('ñ','ñ',$str);
    return $str;

and it works, but when i see the HTML code looks like <p>Feliz Año Nuevo</p>
(i know it works coz ive try it with other letters)
so the replace is not taking the & n t i l d e ; as characters, is taking it as a code for ñ, again, im with the f****** ñ

you should use the chr function like Pygon suggested it's more correct because if you hard code it because of the charset of the file it's possible it is transformed into another letter.

i dont think i understand
actualy, the str_replace() now CAN find de 'ñ' i dont need chr(241) anymore in the first parameter.
but now the problem is in the seccond one that is not taking it as i want, is taking it as what the code represents

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.