0

I'm using ommysql in rsyslog for transfering data into mysql

$ModLoad ommysql
local6.*        :ommysql:localhost,Syslog,rsyslog,1

but cyrilic data goes like "·Ð¾Ð²Ð°Ð½Ð¸Ðµ иÑ�точнÐ" in database.

I think It's because ommysql doesn't set utf8 encoding and starts inserting at once it's connected: http://s017.radikal.ru/i441/1606/e0/050cf30c495f.png

Is it any way to say «set names utf8;» before inserting?

Mike
  • 17
  • 1
  • 1
    This is not a programming question. You may want to try http://serverfault.com/questions or http://unix.stackexchange.com/questions – tink Jun 02 '16 at 05:31

1 Answers1

-1

That should have said something like ование, correct?

When trying to use utf8/utf8mb4, if you see Mojibake, check the following. This discussion applies to Double Encoding, which is not necessarily visible.

  • The bytes to be stored need to be utf8-encoded.
  • The connection when INSERTing and SELECTing text needs to specify utf8 or utf8mb4.
  • The column needs to be declared CHARACTER SET utf8 (or utf8mb4).
  • HTML should start with <meta charset=UTF-8>.
Rick James
  • 135,179
  • 13
  • 127
  • 222