Page 1 of 1

problem with diacritics.

Posted: Wed Sep 19, 2007 12:58 pm
by fabby
scottayy | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I don't know what it says, but i can't show in corect way the letter. The letter  ş it is shown asº and the lettert ţ is shown as  þ.

In the header i've put the code:
[syntax="html"]<meta http-equiv="Content-Type" content="text/html; charset=charset=UTF-8" />
and when i show from the database, i user:

Code: Select all

@mysql_query('SET NAMES utf8');
@mysql_query('SET CHARACTER SET utf8');
@mysql_query('SET COLLATION_CONNECTION="utf8_romanian_ci"');

Do you know what is the problem?
Thanks


scottayy | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Wed Sep 19, 2007 1:03 pm
by mrkite
I personally have found that defining the character set in a meta tag isn't enough.

Instead I have to do this:

Code: Select all

<? header("Content-Type: text/html; charset=utf-8") ?>
You can check in firefox by rightclicking on the page, and selecting "View Page Info" it will say what firefox thinks the Encoding is.

Posted: Wed Sep 19, 2007 1:16 pm
by pickle
If that's actually your meta tag, then you've put "charset=" in there twice.

Posted: Wed Sep 19, 2007 2:16 pm
by fabby
ok. i did that but now that caracters are replaced with "?"

Posted: Wed Sep 19, 2007 2:58 pm
by maliskoleather
try using

Code: Select all

@mysql_query("SET character_set_connection = utf8");

Posted: Wed Sep 19, 2007 3:04 pm
by fabby
nope, is not the solution. is all the same :(
do you have another?
But, for example in phpmyadmin, it is show's ok
And for example, i don'w know if you understand but here is: http://dexonline.ro/search.php?cuv=tap
it look ok.

Posted: Wed Sep 19, 2007 3:07 pm
by maliskoleather
are/did you use the same name/coalition/character set when you inserted the data to the database?

Posted: Thu Sep 20, 2007 3:34 am
by fabby
the data is inserted to the database...i taked the database from the internet.

Look the field tipe for the database:

Lexicon varchar(100) utf8_romanian_ci
HtmlRep text utf8_romanian_ci