New User? Sign Up  |  Sign In  |  Help
Barcode support and
tutorials from IDAutomation
and the community.
Click for the BBB Business Review of this Computers Hardware, Software & Services in Tampa FL
Resolved Questions

FontEncode problem - value with accented characters

The method FontEncode returns an empty string with value "Test string1234567809é" or returns the exception below with a long string and many accented characters. I use the encoding mode E_BASE256.

Exception 'EAccessViolation' dans le module IDAutomationDMATRIX.DLL à 0000085D
Access violation at address 1000185D in module 'IDAutomationDMATRIX.DLL'. Read of address 00000A5E

Why can't I encode this?

See my sample code in Delphi 7:
procedure TForm1.Button1Click(Sender: TObject);
var
DM: TDatamatrix;
ReturnVal: WideString;
tmp: string;
begin
DM := TDatamatrix.Create(self);
DM.SetPixelsXY(0,0);
tmp := 'Test string123456789é';
DM.FontEncode(WideString(tmp), 1, E_BASE256, C10X10, ReturnVal);
Memo1.Text := String(ReturnVal);
FreeAndNil(DM);
end;

Thank you for your help!


06-22-12     12.2 year(s) ago    

  Report Abuse

 

Ben

Best Answer

Update: The latest IDAutomation products support UTF-8. For more information, refer to the UTF-8 Encoding FAQ.

The é should be encoded as ~d233 based on ASCII Chart: https://www.barcodefaq.com/ascii-chart-char-set/

IDAutomation offers limited support for UTF-8 encoding. Refer to the UTF-8 Encoding FAQ for more information.

Posted 12 year(s) ago

(0)
(0)
  Report Abuse
 
Find Interesting
 
Email to Others
 
Bookmark
 
Subscribe to Answer Alert
No comments yet.     Be the first to comment.
Other Answers (16)
Yes the new DLL update works fine except for the character "Ë" (this character is skipped). Also, your Web demo at http://www.bcgen.com/datamatrix-barcode-creator.html doesn't work for this character.
Why does the character “Ë” not work?

It seems that Delphi had not taken the new version (not correctly registered?).
Perhaps Delphi does not manage correctly two versions of DLL that have the same version (1.8.0.3). The build number should be higher (e.g.: 1.8.0.4).

Also, that can generate barcodes with the normal string correctly (e.g.: "Testing 123 éèà") or with the special method encoding with ~dxxx for special characters.

Thank you!

Posted 12 year(s) ago

(0)
(0)
   Report Abuse
I tried 22 of the most popular accented characters and here is the list of the characters that I have tried that do not work correctly (all others work fine):
é (~d233) = empty string with my code (string without the é in your web demo)
è (~d232) = string without the è (Barcode not the same in your web demo)
ê (~d234) = string without the ê (Barcode not the same in your web demo)
Ë (~d203) = ok on some scanners but not all, and the barcode is not the same as in your web demo and gives the same problem.

It is important for us to put these characters in the bar code.
Why does your component not create exactly the same thing on my example as on your website?
Why do some characters not work and others work very well?
Do you have an explanation?

Thanks

Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
I know you have posted a couple of updates since my last response to you. What specific characters are there issues with now? We are able to encode and print the ~d233 without issues using the ActiveX FontEncode. List the characters that are still causing the issue. Some characters have to be encoded in a specific way into the Web control; the ActiveX Font Encoder would be a bit different.

As far as the two barcodes, make sure that there are no spaces encoded in the web component (generated using ASP for IIS and not the ActiveX Control). Make sure the encoding modes and Preferred Formats are the same.

Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
My scanner was not well configured for accented characters. However, I still have the same problems with the "~d232" and "~d233", but it seems correct for other characters that I have tried (~d224, ~d231, ~d235, ~d238, ~d239).

Also, with "~d234", the demo on your website works well, but I noticed that the barcode is not identical in my application as your site demo for this character.

Why does your component not create the same thing on my example as on your website?
Why do some characters not work and others work very well?
Do you have an explanation?

Thanks

Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
I tried many characters with the ~dXXX with bad results (empty string or string without the extended character), but it's okay with standard ASCII (~d065 = "A").
I tried "Test string123456789~d065", which returns "Test string123456789A" (okay).
I tried "Test string123456789~d224", which returns "Test string123456789" (same as your web demo).
I tried "Test string123456789~d232", which returns "Test string123456789" (same as your web demo).
I tried "Test string123456789~d233", which returns "" (empty string and no Bar code), but your web demo returns "Test string123456789". I don't know why this code returns an empty string with my code.

Why does ~dXXX with many extended characters, both your web demo and my code return the string without this character?

Thanks

Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
The é should be encoded as ~d233 based on ASCII Chart: https://www.idautomation.com/ascii-table.html

You may need to continue researching the error message.

Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
Why does your website demo: http://www.bcgen.com/datamatrix-barcode-creator.html with the same string ("Test string123456789é") not return a barcode (this is the same as an empty string for me)?

Why do I receive an exception Access violation in module IDAutomationDMATRIX.DLL with the string "Test string123456789éàêèâTest string123456789éàêèâTest string123456789éàêèâ"?

Thanks.

Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
We have run a test using the ActiveX FontEncode and did not receive an empty string--component not tested directly in Delphi. This means that the error is most likely coming from Delphi or the interaction of the components within it. The sample value, "Test string1234567809é", was encoded using BASE256 without any errors.

With the scanner connected to the COM port, we were able to scan the extended characters. Make sure that you do not have to modify any other setting within your scanner to decode any extended characters. The scanner used is the 4600g by Honeywell.

Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
We will run some tests and let you know.


Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
I am stuck with this problem. I am certainly not the first to attempt to generate a barcode with accented characters. I tried "Test string123456789â" and I have a barcode but the scanner gives me "Test string123456789" (skip â).

Why do some accented characters (> 127) return a barcode and others do not?
Thanks.

Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
Thank you for your answers.
The test with the value "Test string123456789~d233" always returns an empty string (no Barcode) with Process Tilde option (inTilde parameter) = 1. But your web page demo returns "Test string123456789" (without the é).

If I change the inTilde parameter for 0 (for no Tilde), the barcode is created, but the value decoded by my scanner is "Test string123456789|d233". I suppose that is normal with inTilde = 0.

I do not understand why my code does not create exactly the same value as your web page demo.
How can I generate a code bar correctly with an é (and decode with the scanner) or other accented characters?

Thanks.

Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
~d233 would encode the é in Test as string1234567809~d233

Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
Any string without an accent works fine, but any character with an accent (é, à, è, ê) does not work. Try with your website demo: http://www.bcgen.com/datamatrix-barcode-creator.html
Does your component support all ASCII characters (0-255)?
Thanks

Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
Is there any other string that produces the error?

Try:

"Teststring1234567809"

"éééé"

We do not have much experience using Delphi.

Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
Our Scanner data encoding is ISO8859-1 and also the FontEncode requires a WideString. How can we send 8-bit-characters?
Even your Demo on the website cannot return a bitmap for é characters on any mode including Base256.

Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
Are you able to encode the data without using WideString?

This method should still be able to encode your International character:
Encoding Double Byte, Unicode & Extended ASCII

It is possible to scan and encode international and extended characters provided the instructions below are followed:

Encode the data using BASE256 encoding. This option encodes all data, byte-by-byte.
Scan the data via the serial interface option (data bits have to be 8N) on the scanner. Normally, keyboard wedges and USB scanners do not support extended characters above ASCII 128, and only scan characters that are actually on the keyboard. Contact the scanner vendor for more information as some of the scanner's internal settings may need to be changed.


Posted 12.2 year(s) ago

(0)
(0)
   Report Abuse
Email this question link to friends
You must enter an email address, if name is entered or vice-versa for each friend.
Friend #1 -
Friend #2 -
Friend #3 -
Friend #4 -
Friend #5 -
  Your comment on this question
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allows to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must starts with "http://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always starts with " http:// ")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 Characters are allowed. Current Count: 0
  Your comment on this answer
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allow you to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must start with "http://" or "https://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always start with "http://" or "https://")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 characters are allowed. Current Count: 0

You may answer and comment on any thread according to the Terms and Conditions.

 © Copyright 2021 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us
Training Videos on YouTube Join us on Google Plus Join us on LinkedIn Follow us on Twitter Like us on Facebook