Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, August 5, 2013 7:09:22 AM(UTC)

Travis  
Travis

Groups: Registered, Tech Support
Posts: 215

Was thanked: 3 time(s) in 3 post(s)

LEADTOOLS is able to read any type of data found within a bar code.  Be it 1D, 2D, 2D PDF, or QR bar codes.  The data can be in ASNI, UNICODE, or some other encoding, such as Extended Channel Interpretations (ECI) encoding.  It could even be a small image (like an Icon)

Once the data is read, it is given to you as buffer of bytes.  It is then up to you to determine how to parse the data. 

If you know the data is in UNICODE, then you know each UNICODE character will be every two bytes within the buffer of data we give you. 
If you know the data is Icon image data, then you know you can place the byte buffer in a bitmap and display the data. 
If you know the data is ANSI, then you know each byte of the buffer corresponds to an ANSI character.  However, in some cases, the ANSI values could represent characters in another encoding.  Such is the case for the ECI encoded data. 

Extended Channel Interpretations (ECI) encoding
You can determine if the data is ECI encoded by checking the first 10 of the data.  In the attached project I use a barcode that has ECI encoded data.  The data corresponds to the Greek character set ISO 8859-7

When read, you can check the byte buffer we give you for the markers indicating it is encoded in ECI.  For the sample image provided the marker will be "]Q2\000009"  The "]Q2" tells you the bar code has the ECID encoding.  The "\" is a separator, and the "000009" tells you how the rest of the data in the buffer is encoded. 

In Windows, you must use the function MultiByteToWideChar function to covert bytes of data to their UNICODE equivalent to display the characters correctly.  The MultiByteToWideChar function takes a value indicating which code page to use to perform the conversion. 

So to perform the conversion, you must map the ECI value to a Microsoft value which tells the MultiByteToWideChar function which code page to use when performing the conversion. 

The sample attach provides a mapping for most of the ECI values to a Microsoft values and checks for the presence of the "]Q2" indicator. 

Of course there are other indicators to check for as well.  This sample is meant to illustrate how this can be done and can be used as a starting point for you to expand on, including other encodings as needed.

UNICODE
This project also shows you how to write UNICODE characters to a QR barcode and then read them back, displaying their glyphs and displaying their actual character code value in hexadecimal.

The C++ Visual Studio 2010 project is in using LEADTOOLS version 18.0.

File Attachment(s):
Travis Montgomery
Senior Sales Engineer
LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2017, Yet Another Forum.NET
This page was generated in 0.166 seconds.