Jump to content


Photo

No Mysql O Cedilha Está Ok, Porém Na Hora De Exibir Aparece Errado.


  • Faça o login para participar
9 replies to this topic

#1 kilates

kilates

    Novato no fórum

  • Usuários
  • 5 posts
  • Sexo:Não informado

Posted 16/04/2007, 05:25

Migrei um banco mysql tudo ok, no banco olhei os campos e lá estão todos escritos corretamente com o acento e cedilha.

Porém na hora de mostrar no site, o cedilha vira um quadrado, o acento vira um caracter estranho também.

Alguem poderia me ajudar a resolver?

Eu sei que tem haver com UTF-8 e ISO-8...

Porém... nao sei como resolver.

Grato
Abraços

#2 offspring

offspring

    O_o

  • Ex-Admins
  • 946 posts
  • Sexo:Masculino
  • Localidade:São Paulo - SP

Posted 16/04/2007, 08:59

acontece com todos os textos? inclusive os de fora do banco de dados?

#3 Evitark

Evitark

    Normal

  • Usuários
  • 67 posts
  • Sexo:Masculino

Posted 16/04/2007, 09:53

Tente colocar isso:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Dentro da tag <head> do arquivo HTML.

#4 kilates

kilates

    Novato no fórum

  • Usuários
  • 5 posts
  • Sexo:Não informado

Posted 17/04/2007, 00:53

vou tentar usar o codigo sugerido pelo amigo acima.

O certo no banco mysql quando eu for importar é deixar a opcao de UTF-8 ou deixar colocar a opcao do ISO-8859-1 (latin1) ???


Antes no banco tava aparecendo o Ç normal... depois pra tentar resolver eu importei com a opcao de latin1 (=iso)...

dai no banco ficou o ç representado por ç...

dai no site está aparecendo corretamente.

Alguem sabe como funciona isso? qual é o certo de deixar no banco de dados? a exibicao como funciona?

poxa.. queria entender como funciona estes charset da vida... :/

#5 Evitark

Evitark

    Normal

  • Usuários
  • 67 posts
  • Sexo:Masculino

Posted 17/04/2007, 04:02

Se você vai deixar só português no DB, é melhor deixar ISO-8859-1. Mas se vai ter dados em várias linguas, como espanhol, italiano, inglês, francês, etc... ae tem que deixar UTF-8.

Talvez tenha gente que não concorde comigo, mas na minha opnião pessoal esse jeito é a melhor solução.

#6 chipis

chipis

    24 Horas

  • Usuários
  • 439 posts
  • Sexo:Masculino
  • Localidade:Blumenau - SC

Posted 17/04/2007, 14:48

Olá gente to com o mesmo problema aqui ja coloquei isso nas paginas

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


mas não adiantou, todos os caracteres são trocados por ' ? '

como resolver isso?

Edição feita por: chipis, 18/04/2007, 09:07.


#7 Evitark

Evitark

    Normal

  • Usuários
  • 67 posts
  • Sexo:Masculino

Posted 18/04/2007, 00:55

Tentou voltar a codificação das tabelas pra UTF?

#8 Hellp

Hellp

    Turista

  • Usuários
  • 47 posts
  • Sexo:Não informado

Posted 18/04/2007, 08:22

eu tava tendo um problema parecido até, na página exibia os dados do mysql sem acentos ou cedilhas, e os dados do html eram exibidos corretamente... ai testei no navegador com encoding iso-8859-1 ai o mysql ficava certo e o restante errado... passava pra utf-8 e invertia...

eu achei 2 formas pra resolver...

ou eu substituia todos os á por &acute; e assim por diante, ou colocava o código ao exibir dados do mysql:
ex:
<?php
	$link = mysql_connect('localhost','login','senha');
	mysql_select_db('db',$link);

	$dados = mysql_fetch_array(mysql_query("select * from `banco_dados` where `id`='1'"),MYSQL_ASSOC);

	echo utf8_encode($dados['nome']);

	mysql_close($link);
?>
o q eu quero dizer eh q funcionava qdo eu usava o utf8_encode...

bem, espero ter ajudado (ou não)...

#9 chipis

chipis

    24 Horas

  • Usuários
  • 439 posts
  • Sexo:Masculino
  • Localidade:Blumenau - SC

Posted 18/04/2007, 11:12

Só uma pergunta estou utilizando o phpmyadmin 2.9.2 ai la em collation tenho as opcoes, certo.
mas qual utf8 eu devor usar pois tem um monte deles.
Utf8_bin....

Utf8_unicode_ci

qual devo usar?
Ou sera que vou ter que importar os dados tudo de novo?

Gente resolvi o meu probleminha, importei
todas as tabelas e ao invés de usar utf8 usei latin1;
e fucionou agora...
flws..

Edição feita por: chipis, 18/04/2007, 09:09.


#10 JeffMalm

JeffMalm

    Super Veterano

  • Usuários
  • 12254 posts
  • Sexo:Feminino
  • Localidade:Mount Carey

Posted 10/02/2023, 20:21

A Association of CTLA 4 with the A subunit of PP2A buy nolvadex online with master card Thus, the vast majority of women with polycystic ovaries do not have the syndrome
lasix over the counter cvs Salts were filtered from the reaction mixture and the solution was evaporated
Indeed, the nu mouse model has higher numbers of natural killer cells than its wild type strains and retains functional macrophages and other innate immune effectors 99 buy stromectol for people tablets
Beta blockers other than metoprolol have also caused problems such as depression, disorientation, and memory loss, but many of these other beta blockers pass more readily than metoprolol into the brain buy kamagra soft
buy cialis online in usa Nobody else could have done that at the time
ovulation on clomid calculator EC contains many useful substances including antioxidants, polyphenols, and phytochemicals
Pearls in the Muck whats better viagra or cialis Since I didn t get pregnant either time I opted for the HSG before we get too far into our TTC journey
I tested again cd14 again positive and then cd15 and it was positive buy cialis online uk
Some substances, such as grapefruit juice and some drugs, interfere with the action of CYP3A4 stromectol 12mg tablets
clomid by mail CISPLATINE MERCK 10MG 10ML SOL
Payne never gave us false hope but also kept us positive lasix Czech Republic
buying cialis online reviews Try this remedy for about two months, as it will definitely help to cure female infertility problems
The ECLIPSE Trial is a randomized, multi center, open label, prospective trial of perioperative blood pressure control for cardiac surgery where can i buy cialis on line In the longer term RAAS promotes remodeling and fibrosis in heart, kidneys and other organs
Generally, according to particular embodiments of this invention, the at least one preservative is present in the rebaudioside M composition or sweetened composition in an amount sufficient to promote health and wellness buy stromectol australia
Gestational carcinoma of the female breast priligy for sale
buy zithromax 500mg online legal In cases without a clear cause, laboratory investigations should be pursued and must include liver, kidney and thyroid function tests as well as hormonal tests, estrogen, and free testosterone, luteinizing hormone LH, follicle stimulating hormone FSH, prolactin, human chorlonic gonadtrophin HCG, dehydro epiandrosterone sulphate DHEA SO4 and О± Feto protein О± FP
ivermectin dosage Online Apotheke Holland Viagra
when should you take viagra The first successful use of ICSI was to obtain live offspring in rabbits and cattle
The next piece, furosemide 20 milligrams from a combat point of view, Master, this body is far from your invincible strength how much does cialis cost
UT7 Epo S1 cells, a megakaryoblastoid cell line 35, were cultured under normoxic conditions in Dulbecco s modified Eagle s medium containing 10 fetal bovine serum and erythropoietin 2 U ml; Amgen, Thousand Oaks, CA stromectol uk
does nolvadex increase testosterone Trim36 mRNA levels are significantly increased in the severe compared to moderate models
Neoadjuvant or primary Chemotherapy Objective response rate Disease free survival Radiotherapy Tumor size Event free survival Immunotherapy Overall survival Adjuvant Chemotherapy N ivermectin tablet
35 As suggested in mice, the exchange of cerebrospinal fluid with interstitial fluid peaks during sleep, 36 when the 24 hour BP typically dips priligy 30mg price 56 High Blood Pressure 6 people, 13
ivermectin for humans online Table 2 Multivariable analysis on the entire cohort chemotherapy treated and untreated




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq