[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3824: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3826: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3827: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3828: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
Next Framework • Ver Tópico - Acentuação banco de dados

Acentuação banco de dados

Não deixe de perguntar, solucione aqui suas dúvidas...

Acentuação banco de dados

Mensagempor biharck » Qui Nov 25, 2010 4:53 pm

Rógel, estou com um problema clássico de consulta ao banco com caracteres especiais, acentuação etc..

tem uma maneira global de fazer com que todos os meus sql desconsiderem acentuação?


Abs.,
biharck
 
Mensagens: 29
Data de registro: Seg Ago 24, 2009 5:47 pm

Re: Acentuação banco de dados

Mensagempor rogelgarcia » Sex Nov 26, 2010 4:31 pm

Olá Biharck,

Nesse caso o que você deve fazer, é verificar a configuração do banco de dados ou driver...

Geralmente o charset utilizado no Brasil é ISO-8859-1, LATIN1..

UTF-8 talvez resolva o problema também..

Até mais
rogelgarcia
Administrador
 
Mensagens: 674
Data de registro: Qua Jul 08, 2009 9:02 am

Re: Acentuação banco de dados

Mensagempor rogelgarcia » Sex Nov 26, 2010 4:38 pm

Nao sei se é isso, ou se vc está querendo fazer SELECTs que ignorem os acentos..

Se for SELECTs que ignorem o acento, o que deve fazer é o seguinte:

- Criar um XML de configuração da aplicacao (exemplo na documentacao, um XML padrão do Spring)
- Nesse XML, crie um bean do tipo org.nextframework.core.config.DefaultConfig
(Agora o next utilizará o config que voce configurou no XML, e nao um default do next)
- Configure a propriedade 'properties' desse bean e adicione a seguinte propriedade 'funcaoTiraacento'
(O valor da propriedade funcaoTiraacento deve ser o nome de uma funcao no banco de dados que remove os acentos de uma string)

Entao no queryBuilder.. utilize o whereLikeIgnoreAll para comparar strings desconsiderando os acentos

* Se for necessário veja a documentacao do Spring para saber como configurar atributos que são do tipo properties (é bem fácil)
rogelgarcia
Administrador
 
Mensagens: 674
Data de registro: Qua Jul 08, 2009 9:02 am

Re: Acentuação banco de dados

Mensagempor biharck » Sex Nov 26, 2010 4:52 pm

biharck
 
Mensagens: 29
Data de registro: Seg Ago 24, 2009 5:47 pm

Re: Acentuação banco de dados

Mensagempor rogelgarcia » Sex Nov 26, 2010 5:25 pm

Para qual SGBD é essa funçao?

Alguns bancos de dados.. já tem essa funçao pronta internamente...
rogelgarcia
Administrador
 
Mensagens: 674
Data de registro: Qua Jul 08, 2009 9:02 am

Re: Acentuação banco de dados

Mensagempor biharck » Sex Nov 26, 2010 5:33 pm

MYSQL 5+
biharck
 
Mensagens: 29
Data de registro: Seg Ago 24, 2009 5:47 pm


Retornar para Dúvidas

Quem está online

Usuários vendo este fórum: Nenhum usuário registrado online e 1 visitante

cron