Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

unable to parse barcode

Open
#592 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp
Domain
backend

Research direction

The report concerns GS1-128 output from the CODE_128 writer when the GS1_FORMAT hint is set and two application identifiers are concatenated with FNC1 separators. Start with the writer's GS1 handling for Code 128 and check the generated string for FNC1 placement between AI (15) and AI (10). Done means a barcode with two AIs decodes correctly. The issue never states the expected output or a failing test, so confirm the intended behaviour with the maintainer first.

Written by the indexing model from the issue text.

Description

i have the problem that my scanner can't parse a barcode that contains two application identifiers. The barcode i generated for a sscc works fine, but it only contains one application identifier.
here is a snippet from my code. maybe i am using the library wrong?

private static char _fnc1 = (char)29;
public static Bitmap GenerateBestBeforeBatchId128EAN(string bestBeforeDate, string batchId)
{
    string debug = $"{_fnc1}(15){bestBeforeDate}{_fnc1}(10){batchId}";
    Logger.WriteDebugLog(debug);
    
	BarcodeWriter barcodeWriter = new BarcodeWriter
	{
		Format = BarcodeFormat.CODE_128,
		Options = new EncodingOptions
		{
			Width = _barcodeWidth,
			Height = _barcodeHeight,
			Margin = _margin,
			// controls if the content string appears in the output img
			PureBarcode = false
		}
	};
	barcodeWriter.Options.Hints[EncodeHintType.GS1_FORMAT] = true;
	return barcodeWriter.Write(data);BarcodeWriter barcodeWriter = new BarcodeWriter
	{
		Format = BarcodeFormat.CODE_128,
		Options = new EncodingOptions
		{
			Width = _barcodeWidth,
			Height = _barcodeHeight,
			Margin = _margin,
			// controls if the content string appears in the output img
			PureBarcode = false
		}
	};
	barcodeWriter.Options.Hints[EncodeHintType.GS1_FORMAT] = true;
	return barcodeWriter.Write($"{_fnc1}(15){bestBeforeDate}(10){batchId}");
}
Dominant language
C#
Stars
3.1k
Forks
704
Avg merge
13d 17h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from micjahn/ZXing.Net

All issues in micjahn/ZXing.Net

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.