Jump to content
Fórum Script Brasil
  • 0

MySQL não aceita acentos


HarryJ
 Share

Question

Olá, quando tento inserir uma palavra com acento, exemplo: João, dentro do banco ele transforma esse acento em outros caracteres.

Eu quero que seja inserido no banco como João, mesmo, mas ainda não descobri como. Já tentei mudar o collation sem.sucesso.

Obrigado.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

muda o colation ou charset do banco.

ALTER DATABASE Sintax

ALTER {DATABASE | SCHEMA} [db_name]
alter_specification ...

ALTER {DATABASE | SCHEMA} db_name
UPGRADE DATA DIRECTORY NAME

alter_specification:
[DEFAULT] CHARACTER SET charset_name | [DEFAULT] COLLATE collation_name

Exemplo:

ALTER DATABASE meu_banco_novo CHARACTER SET utf8 COLLATE utf8_general_ci;
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Forum Statistics

    • Total Topics
      149.6k
    • Total Posts
      646.2k
×
×
  • Create New...