Welcome Guest, Not a member yet? Register   Sign In
Problems with accents and special characters
#11

[eluser]marcoss[/eluser]
htmlentities will convert all applicable characters to HTML entities, it WILL NOT do character encoding/decoding, the reason it exists is to translate spacial character to their corresponding HTML entities.

However, it may work sometimes as you point, but that is because the function accepts a third parameter ($charset) which if not specified, will default to ISO-8859-1, so the output is returned that way (forced).
#12

[eluser]CARP[/eluser]
Seppo
I can't htmlentity automatically the user input in my forms... can I ?
Congrats for your 700th post

Also, found this "fix" but didn't work... Sad I'm so frustrated
http://www.lorztech.com/2008/06/unable-t...ction.html

============

Edit: I've found this interesting article
http://www.davidtan.org/differences-betw...eneral_ci/

I got astoonished when I read:
Quote:utf8_general_ci is a very simple collation. What it does - it just
- removes all accents
- then converts to upper case
and uses the code of this sort of “base letter” result letter to compare.

But changing the values in database.php, and tables to another collation, don't work
#13

[eluser]CARP[/eluser]
Guys
I've seen something that may be the cause of all this conflicts... am i right?
Check:
http://img154.imageshack.us/img154/7966/sshot1bs9.jpg

Also, doing this in dreamweaver for the header_view.php file (Ctrl+J, go to Title/Encoding and select Unicode(UTF-8) from the encoding drop-down menu.) helped, but

- How do I know if my .php source file is in UTF-8 ?
- Does this assure me that uploading the entire application/db will work on any shared hosting ?

Thanks a lot again...
#14

[eluser]Asinox[/eluser]
ok, yo no soy argentino.... pero tengo el mismo problema...
#15

[eluser]Asinox[/eluser]
ok i fixed!.

Entonces las unicas cosas que tuve que hacer:

DB Collation: utf8_general_ci

<html lang="es">

y claro <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Saludos
#16

[eluser]Unknown[/eluser]
Hola, estoy teniendo el problema de los acentos, tengo dos versiones de CI , la 1.3 y la 1.7 y en la v1.3 no encuentro como poner a funcionar los acentos , hice el asunto de modificar el header y nada .
#17

[eluser]Asinox[/eluser]
Hola, estoy fue lo que yo hice (en mis vistas y en la base de datos)

Entonces las unicas cosas que tuve que hacer:

En la base de datos:

DB Collation: utf8_general_ci

en la vista:

<html lang=“es”>

<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />

Saludos
#18

[eluser]Andres Ledesma[/eluser]
Hello guys! just for the record, I'm working with Spanish especial chars, and this is what I did to get it rollin. Change the values in the database.php inside your config folder like these:

$db['default']['char_set'] = "latin1";
$db['default']['dbcollat'] = "latin1_swedish_ci";

Then just make sure that the collation of your attributes in your db are "latin1_swedish_ci".

And that is all!

Hope this helps someone!
Cheers! Big Grin
#19

[eluser]Asinox[/eluser]
[quote author="Andres Ledesma" date="1232947351"]Hello guys! just for the record, I'm working with Spanish especial chars, and this is what I did to get it rollin. Change the values in the database.php inside your config folder like these:

$db['default']['char_set'] = "latin1";
$db['default']['dbcollat'] = "latin1_swedish_ci";

Then just make sure that the collation of your attributes in your db are "latin1_swedish_ci".

And that is all!

Hope this helps someone!
Cheers! Big Grin[/quote]

Im sorry Andres but the real thing is:

$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

All chars Wink
#20

[eluser]Andres Ledesma[/eluser]
Well, I used "latin1" as char_set and "latin1_swedish_ci" as coll, and the accents and "ñ" worked like a charm.
Smile




Theme © iAndrew 2016 - Forum software by © MyBB