Skip to content

encoding: braille semicolon mapped to the wrong cell - #1990

Open
WatchTree-19 wants to merge 1 commit into
NVIDIA:mainfrom
WatchTree-19:fix-braille-semicolon
Open

encoding: braille semicolon mapped to the wrong cell#1990
WatchTree-19 wants to merge 1 commit into
NVIDIA:mainfrom
WatchTree-19:fix-braille-semicolon

Conversation

@WatchTree-19

@WatchTree-19 WatchTree-19 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

The braille() encoder in garak/probes/encoding.py maps ; to U+2830 (, dots 5,6), which is the letter-sign / grade-1 indicator cell, not a semicolon. English Braille — and UEB, and the French and German codes — all encode the semicolon as dots 2,3 = U+2806 ().

Every other punctuation mark in the same map already follows that standard:

char dots correct?
, 2
: 2,5
. 2,5,6
! 2,3,5
? 2,3,6
; 5,6 ✗ should be 2,3

So this is an isolated transcription error rather than a code-variant choice. Effect: any ; in a payload was braille-encoded to the wrong character.

Fix

One-character map correction, ;U+2806.

Test

There was no test exercising the braille map's individual cells. Added test_braille_punctuation_cells, which pins the exact cell for each punctuation mark. It fails on the old value:

b';' -> '⠰' (U+2830), expected '⠆' (U+2806)

and passes after the fix.

(Noticed while auditing character-map encoders — the same error exists in Microsoft PyRIT's braille converter, filed separately there.)

The braille() encoder mapped ';' to U+2830 (dots 5,6), which is the
letter-sign / grade-1 indicator cell, not a semicolon. English Braille --
and UEB, and the French and German codes -- all encode the semicolon as
dots 2,3 = U+2806. Every other punctuation mark in the map already follows
that standard (comma dot 2, colon dots 2,5, period dots 2,5,6, ...), so this
was an isolated transcription error, not a code-variant choice.

Effect: any ';' in a payload was braille-encoded to the wrong character.

Added test_braille_punctuation_cells, which pins the exact cell for each
punctuation mark; it fails on the old value (';' -> U+2830) and passes on
U+2806.

Signed-off-by: WatchTree-19 <119982314+WatchTree-19@users.noreply.github.com>

@jmartin-tech jmartin-tech left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is conflicting information here:

Braille_ASCII suggests, backed by some historical mailing lists, that ; should map to Letter as dots 5,6 which matches the existing implementation, this is based specifically on how ASCII is mapped which may differ from English, though I am not sure this standard holds any official authority it may influence what an LLM considers to be the translation value.

A commercial reference https://www.pharmabraille.com/pharmaceutical-braille/the-braille-alphabet/ , the UEB standard, German Braille and related teaching references agrees with the change to dot 2,3 in this PR.

This suggests there may be variance in encodings and various models may decode these values in different ways.

I can confirm this definitely impacts tested source payloads as ; is used heavily in html string formats and injection targeted strings, expanding the potential there are false positive or false negatives to explore related to this probe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants