#3553·bat

C23 digit separators are not supported

Author: zyzzyxdontaCreated Jan 16, 2026Updated Sep 5, 2026
Labelsbugsyntax-highlightingupstream-error

What steps will reproduce the bug?

  1. use a digit separator in your C file, e.g. int n = 100'000;
  2. use bat to show the file

What happens?

The digit separator is treated as a single quote. After it, syntax highlighting is broken.

What did you expect to happen instead?

The literal number is shown correctly with the separator treated as such.

How did you install bat?

dnf on Fedora 43


bat version and environment

Software version

bat 0.25.0

Operating system

  • OS: Linux (Fedora Linux 43)
  • Kernel: 6.18.4-200.fc43.x86_64

Command-line

bat prog.c --diagnostic 

Environment variables

BAT_CACHE_PATH=<not set>
BAT_CONFIG_PATH=<not set>
BAT_OPTS=<not set>
BAT_PAGER=<not set>
BAT_PAGING=<not set>
BAT_STYLE=<not set>
BAT_TABS=<not set>
BAT_THEME=<not set>
COLORTERM=truecolor
LANG=de_DE.UTF-8
LC_ALL=<not set>
LESS='--LONG-PROMPT --IGNORE-CASE --RAW-CONTROL-CHARS --quit-if-one-screen'
MANPAGER=<not set>
NO_COLOR=<not set>
PAGER=less
SHELL=/bin/bash
TERM=xterm-256color
XDG_CACHE_HOME=<not set>
XDG_CONFIG_HOME=<not set>

System Config file

Could not read contents of '/etc/bat/config': No such file or directory (os error 2).

Config file

Could not read contents of '/home/david/.config/bat/config': No such file or directory (os error 2).

Custom assets metadata

Could not read contents of '/home/david/.cache/bat/metadata.yaml': No such file or directory (os error 2).

Custom assets

'/home/david/.cache/bat' not found

Compile time information

  • Profile: release
  • Target triple: x86_64-unknown-linux-gnu
  • Family: unix
  • OS: linux
  • Architecture: x86_64
  • Pointer width: 64
  • Endian: little
  • CPU features: fxsr,sse,sse2,x87
  • Host: x86_64-unknown-linux-gnu

Less version

> less --version 
less 679 (POSIX regular expressions)
Copyright (C) 1984-2025  Mark Nudelman

less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less