Print EURO sign

Moderator: Rathinagiri

Post Reply
hynan
Posts: 25
Joined: Sat Jun 29, 2013 7:00 pm

Print EURO sign

Post by hynan » Mon Sep 09, 2013 6:11 am

Hi all,

Am not shure it is reilly a bug,
and maby i did not search good enough, but i cannot find it.

I want print the EURO sign ( € )
the program is for console screen, but not important ( i think )
it must only come on paper,
normally it is code (ALT) 0128
@ 20, 20 PRINT CHR ( 0128 ) FONT "Arial" SIZE 12
wil not work
or....maby it is the txt editor i use the problem ? ( textpad )

Thanks in advance, Greetings, Hynan

User avatar
mol
Posts: 2856
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 126 times
Been thanked: 65 times
Contact:

Post by mol » Mon Sep 09, 2013 8:12 am

When you try chr(0128), you will get character 128 from your font. it really couldn't be € sign, becausecharacters (127-254) from fonts depend from codepage, and were projected before € was born (1995).
You should use unicode, I suppose.

Marek

Italia1
Posts: 60
Joined: Mon Mar 24, 2014 10:55 am
Location: Italia

Post by Italia1 » Wed Apr 16, 2014 3:11 pm

Hello. In my XP Home OEM PRINT chr(128) without FONT option but with

Code: Select all

SET PRINTDOC ENCODING TO "WinAnsiEncoding"
put Euro sign € in my PDF. Try it. I hope it's useful.
Bye. :)
I use the great HMG3.2(stable). Have i nice international HMG to everyone!

User avatar
Pablo César
Posts: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Wed Apr 16, 2014 6:04 pm

Italia1 wrote:Hello. In my XP Home OEM PRINT chr(128) without FONT option but with

Code: Select all

SET PRINTDOC ENCODING TO "WinAnsiEncoding"
put Euro sign € in my PDF. Try it. I hope it's useful.
Bye. :)
Please note for hmg_hpdf library, you must use: SET HPDFDOC ENCODING TO "WinAnsiEncoding" instead. Ok ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
mustafa
Posts: 593
Joined: Fri Mar 20, 2009 11:38 am
Location: Alicante - Spain
Been thanked: 44 times

Post by mustafa » Wed Apr 16, 2014 6:39 pm

Hola amigos
Aportado por Pablo César ----> SET HPDFDOC ENCODING TO "WinAnsiEncoding"

este otro creo que tambien hace lo mismo segun la tabla

viewtopic.php?f=9&t=2497&hilit=hpdf&start=30" onclick="window.open(this.href);return false;
SET HPDFDOC ENCODING TO "CP1252"

ver tambien
viewtopic.php?f=10&t=3416" onclick="window.open(this.href);return false;

regars
Mustafa :D

User avatar
Pablo César
Posts: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Wed Apr 16, 2014 6:54 pm

mustafa wrote:Aportado por Pablo César ----> SET HPDFDOC ENCODING TO "WinAnsiEncoding"
No, no Mustafa. Yo no hé aportado en ese comando. Apenas esclareci, porque estaban utilizando el mismo comando para HMG_HPDF que el de MiniPrint. Este comando fué adicionado por Rathinagiri donde muestra la tabla en:

viewtopic.php?p=22008#p22008

Lo que fué presentado en octubre de 2012.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Pablo César
Posts: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Wed Apr 16, 2014 8:00 pm

What I know is SET HPDFDOC ENCODING TO calls _HMG_HPDF_SetEncoding function and this function has a particulars details regarding only for hmg_hpdf and not used for standard print. See below the source code:

Code: Select all

Function _hmg_hpdf_setencoding( cEncoding )
If _HMG_SYSDATA[ 150 ][ 1 ] == Nil // PDF object not found!
   _HMG_HPDF_Error( 3 )
   Return Nil
endif
HPDF_SetCurrentEncoder( _HMG_SYSDATA[ 150 ][ 1 ], cEncoding ) 
_HMG_SYSDATA[ 150 ] [ 10 ] := cEncoding
Return Nil
So I believe is better not to be confuse both commands. ;)

because I did not found any instructions for SET PRINTDOC ENCODING, which seems you are confusing commands.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
mustafa
Posts: 593
Joined: Fri Mar 20, 2009 11:38 am
Location: Alicante - Spain
Been thanked: 44 times

Post by mustafa » Wed Apr 16, 2014 8:06 pm

Hola Pablo César
me equivoque no queria decir "Aportado", queria decir que lo habias
puesto escrito en tu Pos anterior, creo que todos queremos decir lo
mismo , la Fuente es el Gran Maestro Rathinagiri
viewtopic.php?f=9&t=2497&hilit=hpdf&start=30
Un saludo, Regars
Mustafa
Attachments
Imagen4.jpg
Imagen4.jpg (116.92 KiB) Viewed 963 times

User avatar
Pablo César
Posts: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Wed Apr 16, 2014 8:31 pm

mustafa wrote:me equivoque no queria decir "Aportado", queria decir que lo habias
puesto escrito en tu Pos anterior, creo que todos queremos decir lo
mismo
Ahh si, asi es mejor ! :)

Aqui en este link hay mayores esclarecimientos. Por eso actualizé los URL del demo:

Haru Free PDF Library - Fonts and Encodings
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

Post Reply