• Hello. great job! tx a lot for the plugin.
    I`m having a problem with the character set when pulling data from the data base ( i use uft8 / latin1) and i use lots of ç and ~(portuguese language).
    So, when i make the query, i got strange characters like
    INSTALA<strong>\u00c7\u00c3O</strong> instead of INTALA<strong>ÇÃO</strong>
    I`ve tried to use
    SET NAMES latin1,
    at the beginning of the query, but it didnt work.

    Can u help me with that, please?
    PS: the wordpress site works pretty well with the characterset…. no problems so far.
    My query is as follow:

    SELECT
     wp_posts.post_title AS 'Ocorrência',
    
      GROUP_CONCAT(if(meta_key = 'ocorrencia_descricao', meta_value, NULL)) AS 'Descrição',
      GROUP_CONCAT(if(meta_key = 'ocorrencia_analise', meta_value, NULL)) AS 'Análise',
      GROUP_CONCAT(if(meta_key = 'ocorrencias_recomendacoes_de_seguranca', meta_value, NULL)) AS 'Rec. de Segurança',
      GROUP_CONCAT(if(meta_key = 'ocorrencia_responsavel_pelo_relatorio', meta_value, NULL)) AS 'Responsável',
      GROUP_CONCAT(if(meta_key = 'ocorrencias_prazo', meta_value, NULL)) AS 'Prazo',
      GROUP_CONCAT(if(meta_key = 'ocorrencias_status', meta_value, NULL)) AS 'Status'
    FROM wp_postmeta
        left JOIN wp_posts
            ON wp_postmeta.post_id = wp_posts.ID
        left JOIN wp_users
           ON wp_posts.post_author = wp_users.ID
    where wp_posts.post_type = 'ocorrencia' AND wp_posts.post_title LIKE '%TWR%'
    GROUP BY post_id
    order by wp_posts.post_title
     ;

    http://wordpress.org/extend/plugins/elisqlreports/

Viewing 1 replies (of 1 total)
  • Plugin Author Eli

    (@scheeeli)

    Sorry, I’m good with SQL queries but not that good with character encoding issues. I would have thought that utf8 would handle those characters just fine. Maybe your database is not really utf8? I don’t think there is anything you can do to your query to fix this. I would suggest looking in your database to see if the Ç character is actually stored as \u00c7, because if it is then I think you would have to convert it.

    Maybe someone else on the forum here will know what to do.

    If you figure it out please let me know what the solution was.

    Aloha, Eli

Viewing 1 replies (of 1 total)
  • The topic ‘character set’ is closed to new replies.