---
title: "configparser: multi-byte delimiter panic fixed in Rust"
description: "A fix to configparser, an INI parser in Rust: a multi-byte UTF-8 delimiter such as § no longer causes a panic, and the value after it is read correctly."
url: "https://vulcode.com/en/opensource/contributions/configparser-rs"
lang: "en"
---

[All contributions](https://vulcode.com/en/opensource/contributions)

QEDK/configparser-rs

# configparser

A simple INI configuration parser in Rust with no dependencies and configurable key-value delimiters.

[See the repository](https://github.com/QEDK/configparser-rs) [All contributions](https://vulcode.com/en/opensource/contributions)

- **Language**: Rust
- **GitHub stars**: 88
- **Merged changes**: 1
- **Project site**: [crates.io](https://crates.io/crates/configparser)

## What we changed

Parsing with a multi-byte delimiter, such as the § sign, no longer panics and returns the right value.

### What this work shows

- UTF-8 encoding and char boundaries

- INI format parsing

- Regression tests in Rust

What was broken

### A § delimiter crashed the parser

The delimiters field is public and accepts any character. With §, which takes two bytes in UTF-8, Ini::parse sliced the text one byte past the delimiter, in the middle of the character, and panicked with "not a char boundary".

How we fixed it

### Stepping by the character's length

The parser now steps past the delimiter by its real UTF-8 length from char::len_utf8, so nothing changes for the single-byte = and :. The multibyte_delimiter_does_not_panic test checks that the value after § is read correctly.

[#61](https://github.com/QEDK/configparser-rs/pull/61)

## Merged change 1

- [#61 Fix panic when parsing with a multi-byte delimiter Merged 6 September 2026](https://github.com/QEDK/configparser-rs/pull/61)

## What it taught us

In Rust a string index is a byte, not a character. Slicing inside a UTF-8 character panics, so we compute the step from the character's length rather than assume every delimiter is one byte.

[More about this technology: Rust](https://vulcode.com/en/technologies/rust)

## Other projects we write code for

- [**Zed** Rust · 95,562 stars A fast code editor in Rust from the creators of Atom and Tree-sitter, with live multiplayer editing.](https://vulcode.com/en/opensource/contributions/zed)

- [**uv** Rust · 92,647 stars An extremely fast Python package and project manager written in Rust. It creates projects, installs dependencies and manages virtual environments.](https://vulcode.com/en/opensource/contributions/uv)

- [**ripgrep** Rust · 70,186 stars A command line tool that recursively searches directories for a regex pattern while respecting your .gitignore. Written in Rust.](https://vulcode.com/en/opensource/contributions/ripgrep)

- [**Alacritty** Rust · 66,271 stars A cross-platform terminal emulator rendered with OpenGL, written in Rust and configured with a TOML file.](https://vulcode.com/en/opensource/contributions/alacritty)

- [**Gleam** Rust · 22,083 stars A friendly programming language for building type-safe, scalable systems. Its compiler is written in Rust.](https://vulcode.com/en/opensource/contributions/gleam)

- [**Sonic** Rust · 21,387 stars A lightweight full-text search backend in Rust, an alternative to Elasticsearch that runs in a few megabytes of RAM.](https://vulcode.com/en/opensource/contributions/sonic)

## Describe your project.

A free quote comes back within an hour during working hours.

### Rather skip the form?

Ask in the chat or write to us directly.

Open the chat

- **Email**: [hello@vulcode.com](mailto:hello@vulcode.com)
- **Phone**: [+48 576 043 920](tel:+48576043920)
- **Discord**: [discord.gg/vulcode](https://discord.gg/vulcode)
