OS2World OLD-STATIC-BACKUP Forum

OS/2 - Technical => Applications => Topic started by: yuri102 on 2011.01.18, 12:30:35

Title: Barcode trouble/ please help.
Post by: yuri102 on 2011.01.18, 12:30:35
Hi there.

I have trouble on os/2 system. This includes print barcode lines in os/2 system editor. The Int48DlTt barcode font has Extended ANSI chars collection in range 30-128 and 8 chars in extended part of table.

These codes are C4, C5, C7, C9, D1, D6, DC, E1 (hex) and they must print as barcode lines on display and printer.
The problem is consist of square reflection instead of lines. Range 30-128 normally reflects as lines, but C4, C5, C7, C9, D1, D6, DC, E1 chars reflects as squares.  :( ???

Barcodes are emitted by russian post service. The Int48DlTt font includes C4, C5, C7, C9, D1, D6, DC, E1 lines reflection.Anybody  can to help me, how to resolve problem with square spaces?
Title: Re: Barcode trouble/ please help.
Post by: warpcafe on 2011.01.18, 14:21:11
Hi Yuri,

can you attach a screenshot?
I have a vague idea of what you mean with "squares"... but it would help to see.
How does the thing look if you use StarOffice/OpenOffice and actually *print* them? The same?

Is this barcode font freely available?
If so - where can I get it to have a look and try it myself?
Is it a TrueType, Adobe-1, ...or a bitmap/"screen" font?

(I find it interesting that it works for the first 127 bytes of the character set... is there some 7-bit vs. 8-bit problem with that font perhaps?)

Cheers,
Thomas
Title: Re: Barcode trouble/ please help.
Post by: yuri102 on 2011.01.18, 14:54:06
My sreenshots on windows xp(Far, Notepad), but the same behavour is at OS/2(system OS/2 editor). Seems trouble dsn't independ on editor.
Title: Re: Barcode trouble/ please help.
Post by: warpcafe on 2011.01.18, 15:01:42
Okay, that's what I thought.
Usually, the square means that there is no data (vector, curve, bitmap) for the character in the fontfile.
So to say "unused" place in the font.

Hmm... since you're running Windows, did you check this font with "charmap"?
Start > Run > "charmap"
Then load the barcode font by selecting it from the llistbox.
Perhaps you can see the character you expected in a different location.

Hope this helps,
Thomas
Title: Re: Barcode trouble/ please help.
Post by: yuri102 on 2011.01.18, 15:03:13
Sorry, i wrong typed name of font - IntP48DlTt is true.

http://www.eaglefonts.com/intp48dltt-ttf-164268.htm
http://font-catalog.ru/images/1.php?IntP48DlTt%20Normal.Ttf


So, Start > Run > "charmap" shows used 8 chars
Title: Re: Barcode trouble/ please help.
Post by: yuri102 on 2011.01.18, 15:13:13
I look through "char map". These problem characters are available only there.
look screenshot please.

Any idea?
Title: Re: Barcode trouble/ please help.
Post by: jep on 2011.01.18, 16:47:13
Does your software use the VIO (Character mode) view or perhaps a GUI? Your Command Line view/edit indicate just that.

VIO use a different code page here, 850 compared to Win GUI applications 1252.
You may experience something similar, 866 compared to Win GUI applications 1251.

Change the encoding from "Unicode" to e.g. "DOS: American" or "DOS: Cyrillic" (Dropdown below the characters) to see the available bar codes and their position if they differ and may explain why you see the problems.

You don't have those problems if you use OS/2-eComStation as the code pages usually are the same throughout both GUI and VIO.
Title: Re: Barcode trouble/ please help.
Post by: yuri102 on 2011.01.18, 17:07:50
Dos:American and Dos: Cyrillic tables screenshots:
Title: Re: Barcode trouble/ please help.
Post by: warpcafe on 2011.01.18, 17:47:55
Hi Yuri,

as jep has explained, it seems to be a codepage problem (or a problem when resolving codepages). But:

More interesting for me is to understand: What do you want to do in OS/2 with this font?
- Are you running a DOS program in OS/2 that has this problem?
- Or is it a native OS/2 program?
- if OS/2 program: Is it a GUI (graphic/PM) or a VIO (text mode) program?

Hint: There is a shareware (free trial) version of "fontfolder" at hobbes.
This can be used to get a better view on the fonts in OS/2 (a bit like "charmap" in Windows)

Cheers,
Thomas
Title: Re: Barcode trouble/ please help.
Post by: yuri102 on 2011.01.18, 20:56:48
we use os/2 native program (datacentral.exe). this program use datacard 7000 printing hardware, including mail printer, card personalization printer. The mail printer do lists, which has a postal barcode for russia mail service.

Mail service is a source of barcodes to our datacard 7000 and rarely some barcodes contains second-part ansi table character. This give us troubles with it.
Title: Re: Barcode trouble/ please help.
Post by: warpcafe on 2011.01.18, 23:06:35
Hi,

OK, so I guess the trouble is that you are using a windows TrueType font on an OS/2 system... (?) which may result in wrong codepage being used. Not sure though. And even if this is correct, I can only assume you *could* fix that with the "codepage=...,..." statement. Who knows. Not me. :(

So to be honest: I don't have a clue. :(

Perhaps (maybe,maybe...) Alex Taylor has some idea on what could be wrong. But I'm sure the more experienced people can give some insight as well. If all fails, I'll try to download the TTFs and play around with it. That might take a while until I have the time to do this though...

Cheers,
Thomas
Title: Re: Barcode trouble/ please help.
Post by: RobertM on 2011.01.19, 00:04:09
Thomas and jep seem to be on to the solution here. What you will need to do is find the correct codepage which will allow the full representation of the font's charset needed. Then, you will have to use that codepage when displaying and printing the font. Alternately, you could find a barcode fontset that has a codepage that matches your normal codepage (or use a font editor to move the fonts around to match your current codepage selection).
Title: Re: Barcode trouble/ please help.
Post by: yuri102 on 2011.01.19, 00:39:54
Thanks all for replies.
In fact, config.sys on os/2 contains codepage=866,850. I tried change codepage to 866 only and restart system, but problem still here.
Also, it was DEVICE=C:\OS2\BOOT\UNICODE.SYS, then add ansi.sys yet.
Finally, ansy.sys was left only.

But this problem still here...

I can try play with codepage=...,... but have no idea about values.
Simplify once, changing for config.sys, it was introduction to crash system and repaire one. Because its, I afraid to play often.
Title: Re: Barcode trouble/ please help.
Post by: warpcafe on 2011.01.19, 01:06:44
Hi,

again, I am not sure, but... did you try to change the sequence and make "850" be the first one?
(This is what it looks like for me 850,837 to have German characters AND line-chars)

It MAY be usefult to also play with the "windows" codepages here... but I have NO IDEA if that works in OS/2!

Regards,
Thomas
Title: Re: Barcode trouble/ please help.
Post by: yuri102 on 2011.01.19, 01:28:03
So, may be to play with windows xp codepage at first. But i don't know, where is that codepage? is it Regional Settings box?
Sorry for inconvenience please
Title: Re: Barcode trouble/ please help.
Post by: Andi on 2011.01.19, 10:33:57
Quote from: yuri102 on 2011.01.19, 00:39:54
... config.sys on os/2 contains codepage=866,850. I tried change codepage to 866 only and restart system, but problem still here.
...
Some general notes for codepages - OS/2 uses by default the first of the two values from the config.sys. In your case 866. The second one is only 'prepared' (see below)

So it's clear there is no difference for you between -
codepage=866,850 and
codepage=866
as 866 is used in both cases.

To use the second one (the prepared one) you have to use the chcp command. f.i. open a command shell (CLI window) and type in "chcp 850" (this only works when you have 850 'prepared' in your config.sys) and then start your program datacentral.exe FROM THIS COMMAND SHELL. Now datacentral should run with codepage 850 instead the default 866. But, I've no clue if 850 is the one you really need.

In general it can be dangerous playing with the first value (866 from above example) of the codepage entry. Changing the second one (850) usually do not harm cause OS/2 itself only uses the first number.
Title: Re: Barcode trouble/ please help.
Post by: ivan on 2011.01.19, 14:21:10
Hi yuri102,

As Andi says 866 is your Russian standard code page which you need to see anything in your language.  The second is the code page that can be used when it is called upon.  That is the one for you to experiment with.

On several of my systems we have codepage=850,1004 - the 1004 is the windows code page.

The only problem is that your keyboard, if it is Russian 441 or 443 layout, most probably will not map the 1004 code page to where you expect. 

You might be able to use table1.2.0 to see what the actual mappings are and if you find them then you can note them down for future use.

I'm sorry I can't be of more help but my Russian is non existent and I don't have a Russian keyboard to test with.

ivan
Title: Re: Barcode trouble/ please help.
Post by: jep on 2011.01.20, 18:04:43
Download the OS/2-eCS version of Character Map from the Russian Developer "GlassMan".

You should then be able to display the barcodes that you intend to print and where they're positioned in the codepages.

Please do show us what your the actual barcode look like in that applicaiton as well.
A file of 252Mb is a bit much to fetch just like that for (a) font(s)?!.
Title: Re: Barcode trouble/ please help.
Post by: wimpie on 2011.01.23, 14:11:29
Quote from: jep on 2011.01.20, 18:04:43
A file of 252Mb is a bit much to fetch just like that for (a) font(s)?!.

I found that barcode font at http://www.tut-vse.ru/ttf/Fonts/

cp850arial.gif shows the characters and cp850bcode.gif shows the barcodes on my OS/2 Warp 4.0 NL system.
Title: Re: Barcode trouble/ please help.
Post by: jep on 2011.01.24, 09:10:04
Hello,

The codepage 866 (Cyrillic) doesn't seem to contain the expected positions to render characters above 7E (126) while both codepage 850 and 1004 (similar to Win1252) can. (See post by wimpie and compare it with the attached images)

You may want to check if you can use the command "chcp 850" or "chcp 1004" as suggested to be able to render those characters, provided you add one of the codepages to config.sys, unless you already have.

//Jan-Erik