I'm currently evaluating your component and I have something I can't do. I need a way to properly encode extended characters from different encodings (not only default iso-8859-1). Basing on one of the posts here I was able to do that with Base256 encoding and proper ECI codes. However according to specs there is another way of doing the same using Text/ASCII mode. Does your component support this feature?
I figured out it somehow does, because it detects ECI codes properly. I tried with a string like "Ã<ECI000007>Д<ECI000004>ą". I don't know if it displays properly here, but the first char is in iso-8859-1, then it switches to iso-8859-5 with one character and finally to iso-8859-2 with another character. If I try it with Text/C40 I get "Value does not fall within the expected range". In ASCII mode it works, but the results are strange for me:
First character was encoded properly, but it uses default encoding. The rest is read as some numeric values which doesn't even make much sense to me. I thought it might be the problem with your reader, but I've also checked it with our hardware barcode verifier and it shows the same numeric values following the ECI codes. Am I doing it wrong?
Our barcode writer does not encode text, you need encode text by yourself, i.e. you should create a sequence of value items (ValueItemBase) from your text and pass the value items to the barcode writer.
Our barcode reader also does not decode text, you need decode text by yourself, i.e. you should get a sequence of value items from barcode reader and create the text from value items.
var items = new List<ValueItemBase>();
items.Add(NonDataFlags.CreateECICharacter(4));
items.Add(new BinaryValueItem(iso88592.GetBytes("ążśźęćńółĄŻŚŹĘĆŃÓŁ")));
items.Add(NonDataFlags.CreateECICharacter(7));
items.Add(new BinaryValueItem(iso88595.GetBytes("АБВГДЕЖЗИЙКЛМНОП")));
items.Add(NonDataFlags.CreateECICharacter(28));
items.Add(new BinaryValueItem(big5.GetBytes("分切刈勻勾勿化匹午升卅卞厄友及反")));
dm.Settings.ValueItems = items.ToArray();
This way it works, but it's all encoded as Base256, which is not optimal, because it encodes 1 character on 1 byte. Text modes use 2 bytes for 3 characters, so it takes less space. We rather don't expect many special characters so it would be better to encode it as Text. According to Datamatrix specs it's possible to change default encoding with proper ECI codeword and then use normal ASCII/Text encoding to encode extended characters. Depending on the mode it will require a special codeword preceding the actual extended character, so each special character will actually take 2 codewords, but there should be only quite a few of them. The text we encode might be up to about 500 characters so it seems that we can have save some bytes by prefering Text over Base256 encodation of diacritics. This is especially important as our customers have strict requirements for the barcodes we generate and we cannot exceed specified sizes.
I wonder if such thing can be achieved by your component and how.