Announcement

Collapse
No announcement yet.

Euro sign for PB for DOS programs & printing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Euro sign for PB for DOS programs & printing

    I have gotten the question about use of the Euro sign in programs.
    Since Windows itself has some solutions, this does nothing for
    people still using real DOS versions. Has anyone worked out a
    solution for the DOS environment yet?

    Changing the printer driver or sending it graphically may be
    solutions, but not easily implemented for all possible printers.

    Anyone?

    regards,

    Henk




    ------------------
    Henk Broekhuizen,
    [email protected]
    Henk Broekhuizen, PA3BLP
    powerbasicforum -at- doorhet.net
    Sexbierum, The Netherlands
    ========================

    #2
    greetings --

    i believe that an "e" is being used as a sign for the euro.

    you have a choice between the letter e -- chr$(69) --- or a
    special type of "e" -- chr$(238).

    there are two other variations of "e" -- chr$(144) and chr$(228)

    run the sample code below to see all four e's on-screen. then run it again,
    substituting lprint for print and see if your printer will print any or
    all of the four e's.
    Code:
    $compile memory
    cls
       
    color 11
    print " types of ";chr$(34,69,34);" characters available with powerbasic dos"
    ' 34 is the " mark -- 69 is upper-case e
      
    for emarx=1 to 7
    read qet 
    print
    
    color 15: print chr$(32,qet);:' 32 is the space character
    color 10: print " 400,000"
      
    if emarx=4 then
       color 11
       print
       print " compare with other currency symbols"
    end if
      
    next emarx
       
    print
    color 10: print " 10 ";
    color 15: print chr$(155)
       
    print
    end
       
    data 69,144,228,238,36,156,157
    ' 36 is $, 156 is £ (pound), 157 is ¤ (yen), 155 is ¢
    ------------------
    thanx-a-lot, enjoy and god bless vespucci-land,
    frank -- my humble abode -- 4000-and-beyond

    [this message has been edited by frank ferrell (edited october 20, 2001).]

    Comment


      #3
      Thanx for your input Frank. The last chararcter is pretty close
      to the goal. By law it has to be the right character to prevent
      problems with payments and enforcement of payments. So really
      we are looking for an lowercase-type 'c' with two horizontal
      stripes through it, so a special characters like $, pound sign
      and Yen sign. Those were around however when the char-sets were
      defined, but the euro sign isn't.

      Thanx again.

      Henk


      ------------------
      Henk Broekhuizen,
      [email protected]
      Henk Broekhuizen, PA3BLP
      powerbasicforum -at- doorhet.net
      Sexbierum, The Netherlands
      ========================

      Comment


        #4
        I have tried it, but you forgot to put an END IF there, so probably
        best to tweak it a bit more and put that one in just before or after
        the empty PRINT statement.
        Thanx again,

        Henk


        ------------------
        Henk Broekhuizen,
        [email protected]
        Henk Broekhuizen, PA3BLP
        powerbasicforum -at- doorhet.net
        Sexbierum, The Netherlands
        ========================

        Comment


          #5
          thanx and ok henk --

          thanx for catching that! what a stupid i am!

          are you printing out straight to a printer in dos? or are you saving to a file and printing the results some other way? if the latter, are you printing out in windows using a fixed width true type font?

          andale mono and courier new offer different representations of "e". and there are other fixed-width true type fonts you can try.

          go to this link -- help 311 -- and see if any of the fonts offered there are useful. you should also try out the character map program. it will give you a peak at all the characters of a given font.

          ------------------
          thanx-a-lot, enjoy and god bless vespucci-land,
          frank -- my humble abode -- 4000-and-beyond

          [this message has been edited by frank ferrell (edited october 21, 2001).]

          Comment


            #6
            Well, the question for the euro came from an old customer of us &
            PowerBASIC Inc.. We used to be the importer for PowerBASIC products and add-ons
            in the Netherlands.
            So I will pass this info to them and have to hear from them if it
            solved their problem.

            Thanks very much for your reactions, responses and ideas. This is much appreciated.

            Regards,

            Henk


            ------------------
            Henk Broekhuizen,
            [email protected]
            Henk Broekhuizen, PA3BLP
            powerbasicforum -at- doorhet.net
            Sexbierum, The Netherlands
            ========================

            Comment


              #7
              greetings, thanx and good luck henk

              with character map, you notice some interesting things. such as the fact that
              some windows special characters require a 4-digit (rather than 3) altkey code.
              here's an example --
              Code:
              this little square dot • is created with alt-0149 (alt-149 creates ò symbol).
              the dot may remind you of the dos alt-254 character, which is a little bigger
              than the windows version.
              ------------------
              thanx-a-lot, enjoy and god bless vespucci-land,
              frank -- my humble abode -- 4000-and-beyond

              [this message has been edited by frank ferrell (edited october 22, 2001).]

              Comment


                #8
                Character Composition: The Keypad Story

                Hold down the ALT key, and you can use the numeric keypad to enter
                the ASCII code of any character. For example, hold down ALT, press
                "6" then "5", and release ALT. Presto, you've created a CHR$(65),
                or "A".

                This is basically a DOS feature, although it's been continued on to
                Windows. So, as you might guess, there's also a way of specifying
                ANSI characters, instead of ASCII characters: you enter a "0" as the
                first digit.

                Try this with ALT 1 2 8 and ALT 0 1 2 8 to see how it works.

                ------------------
                Tom Hanlin
                PowerBASIC Staff

                Comment


                  #9
                  Easy enough on-screen in DOS, just edit one of the less
                  used characters in the screen font. I am currently working (or
                  thinking about working..) out a method for printing out of DOS.
                  However, it is unlikely that I will support many printers, H-P,
                  Epson & Canon BJ are the only types I currently do graphics for.
                  Getting the information for this stuff is like pulling teeth.

                  ------------------

                  Comment


                    #10
                    greetings tom hanlin --

                    alt-128 Ç

                    alt-0128 ‡

                    yup - that's quite a difference!

                    hey, henk -- check this out !!
                    ------------------
                    thanx-a-lot, enjoy and god bless vespucci-land,
                    frank -- my humble abode -- 4000-and-beyond

                    [this message has been edited by frank ferrell (edited october 22, 2001).]

                    Comment


                      #11
                      Alas, ALT+0128 won't work a DOS application though since that uses the OEM character set, and produces the same result as a ALT+128. Entering ALT+0128 in a Windows app should get you the ANSI (Euro) character just fine.

                      BTW, the almost completed DOSPRINT 2.0 will include the ability to print a Euro character too (among other new features like image printing, shaded boxes, etc). (yes, that right folks, a little no-so-subtle advertising! )

                      Regards,
                      Lance
                      Lance
                      mailto:[email protected]

                      Comment


                        #12
                        Thanks for all the suggestions guys. Since the person works in DOS
                        the ANSI thing is IMHO not usable. But perhaps Lance's solution is
                        one to consider for them.
                        I will pass on the suggestion.

                        Thanks to all,

                        Henk


                        ------------------
                        Henk Broekhuizen,
                        [email protected]
                        Henk Broekhuizen, PA3BLP
                        powerbasicforum -at- doorhet.net
                        Sexbierum, The Netherlands
                        ========================

                        Comment


                          #13
                          And David . . . is you have a solution I know some people
                          who are happy to beta-test that solution or you <grin>.

                          May be the solution is also something for PowerBASIC Inc to
                          publish on their site if it is a solution for many, since
                          PBforDOS in 9 EU countries cannot be longer used for programs
                          which print currency, like factor/bill/programs.

                          Thanx again guys!

                          Henk


                          ------------------
                          Henk Broekhuizen,
                          [email protected]
                          Henk Broekhuizen, PA3BLP
                          powerbasicforum -at- doorhet.net
                          Sexbierum, The Netherlands
                          ========================

                          Comment


                            #14
                            I have completed a DOS-Mode screen font library for PowerBASIC.

                            I know I can get the € to show on the screen, but as for printing,
                            I don't know enough about sending info to the printer to do this.

                            If I learn more, I will write a nice free library which includes
                            printer functions.

                            Amos

                            ------------------
                            Amos
                            DosOS.com
                            mailto:[email protected][email protected]</A>

                            Comment


                              #15
                              Thanx for reacting. The main problem was printing, so if you have a solution in the future I think lots of people would speak out your name with admiration for the next years, as they do with the guy who gave us PowerBASIC <grin>.

                              Regards,

                              Henk


                              ------------------
                              Henk Broekhuizen,
                              [email protected]
                              Henk Broekhuizen, PA3BLP
                              powerbasicforum -at- doorhet.net
                              Sexbierum, The Netherlands
                              ========================

                              Comment


                                #16
                                Henk,
                                Are you Nederlander or Belgium?
                                Do you have an emailadres, if yes can you email me:
                                to [email protected]

                                Greetz
                                Stephane


                                ------------------
                                ICQ: 123632482

                                Comment


                                  #17
                                  Originally posted by David J Walker:
                                  Easy enough on-screen in DOS, just edit one of the less
                                  used characters in the screen font. I am currently working (or
                                  thinking about working..) out a method for printing out of DOS.
                                  However, it is unlikely that I will support many printers, H-P,
                                  Epson & Canon BJ are the only types I currently do graphics for.
                                  Getting the information for this stuff is like pulling teeth.

                                  David, I have been trying to locate the screen font in DOS.
                                  I wrote a program to print landscape using the screen font but
                                  I had to get this by printing a character at the top of the screen
                                  and using the graphics GET to get a bit map. Could you let know
                                  where to access the font?
                                  Thanks, Don

                                  to

                                  ------------------

                                  Comment


                                    #18
                                    Another routine for printing the Euro. A solution contributed by Edward Mendelson, put into PB/CC style by me:
                                    Of course this solution should also work with PBforDOS:


                                    FUNCTION PBMAIN() AS LONG
                                    LOCAL euro AS STRING
                                    LOCAL euro2 AS STRING

                                    'euro="C"+CHR$(8)+CHR$(27)+"&a-.05R"+ CHR$(27)+"(s16H"+ CHR$(27)+ "(10U"+ CHR$(205)+ CHR$(8)+ CHR$(27)+"&a+.05R"+ CHR$(27)+"(s10H"+ CHR$(27)+"(8U"+" "
                                    'euro="C"+CHR$(8)+CHR$(27)+"&a-.05R"+ CHR$(27)+"(s16H"+ CHR$(205)+ CHR$(8)+ CHR$(27)+"&a+.05R"+ " "
                                    euro="C"+CHR$(8)+CHR$(27)+"&a-.05R"+ CHR$(27)+"(s16H"+ CHR$(205)+ CHR$(8)+ CHR$(27)+"&a+.05R"+ CHR$(27)+"(s10H"+ CHR$(27)+"(8U"+" "
                                    euro2="C"+CHR$(8)+CHR$(27)+"&a-.07r-.08C"+CHR$(27)+"(s16H"+CHR$(27)+"(10U"+CHR$(205)+CHR$(8)+CHR$(27)+"&a+.07r+.08C"+CHR$(27)+"(s10H"+CHR$(27)+"(8U"+" "

                                    LPRINT "this is a "euro" sign. "
                                    LPRINT "And this is the enhanced one: "euro2
                                    LPRINT CHR$(12);
                                    END FUNCTION
                                    '  - letter C
                                    '<chr8>  - backspace
                                    '<chr27>&a-.1R - UP one-tenth OF a LINE
                                    '<chr27>(s16H - switch TO 16cpi font TO reduce size OF crossbars
                                    '<chr27>(10U  - switch TO PC-8 character SET
                                    '<chr205> - type character 205 IN PC-8 character SET (two horizontal lines)
                                    '<chr8> - backspace
                                    '<chr27>&a+.1R - DOWN one-tenth OF a LINE
                                    '<chr27>(s10H - switch back TO 10cpi font
                                    '<chr27>(8U - switch back TO Roman8 character SET
                                    '<32> - type a space

                                    Any other suggestions are welcome!

                                    Regards,

                                    Henk


                                    ------------------
                                    Henk Broekhuizen,
                                    [email protected]
                                    The Netherlands

                                    [This message has been edited by Henk Broekhuizen (edited November 17, 2001).]
                                    Henk Broekhuizen, PA3BLP
                                    powerbasicforum -at- doorhet.net
                                    Sexbierum, The Netherlands
                                    ========================

                                    Comment


                                      #19
                                      JFYI, those Escape code sequences are in HP/PCL escape code format, for use with HP and compatible printers only.



                                      ------------------
                                      Lance
                                      PowerBASIC Support
                                      mailto:[email protected][email protected]</A>
                                      Lance
                                      mailto:[email protected]

                                      Comment


                                        #20
                                        Oh, and only the "enhanced" one worked properly on my HPIIID - the "non-enhanced" one printed a small 'e' where the '=' sign is positioned by the "enhanced" string.

                                        All my other HP and PCL printers are off-line at the moment (I have quite a few!) so I could not test it on them.

                                        ------------------
                                        Lance
                                        PowerBASIC Support
                                        mailto:[email protected][email protected]</A>
                                        Lance
                                        mailto:[email protected]

                                        Comment

                                        Working...
                                        X
                                        😀
                                        🥰
                                        🤢
                                        😎
                                        😡
                                        👍
                                        👎