# PBM: /var/log/messages is... a binary file!

## VinzC

Hi all.

I remember I already had that issue on another (Gentoo) machine:

```
/var/log/messages: application/octet-stream; charset=binary
```

Is that normal? Or how do I force the character set of my main log file?

Packages:sys-kernel/ck-sources 3.3.4 (though I also have the issue with Gentoo sources)

app-admin/logrotate 3.8.1

app-admin/syslog-ng 3.2.5

dev-libs/eventlog 0.2.12Just in case.

----------

## Fitzcarraldo

Is this the same problem as reported in Gentoo Bug Report No. 406623? See also [SOLVED] strange behaviour with /var/log/messages.

I have to remember to use the --text option with grep when searching /var/log/messages.

----------

## VinzC

Well I don't have any NUL character in my log file but in the end I spotted a few strange characters logged by vesafb:

```
...

Aug 22 08:54:55 scotty kernel: [    0.928236] uvesafb: NVIDIA Corporation, BIOS-P/N@N8447, GW-CLK@<9B>^B^O^C<9B>^B^O^C, OEM: NVIDIA, VBE v3.0

Aug 22 08:54:55 scotty kernel: [    0.968942] uvesafb: VBIOS/hardware supports DDC2 transfers

Aug 22 08:54:55 scotty kernel: [    1.003224] uvesafb: monitor limits: vf = 76 Hz, hf = 83 kHz, clk = 170 MHz

Aug 22 08:54:55 scotty kernel: [    1.003454] uvesafb: scrolling: redraw

...
```

Could that be the reason?

EDIT: Yup! that's the reason! I grep'ed out all those lines that contain 'BIOS-P/N' and the log file type is back to text.

----------

