Print EURO sign

Moderator: Rathinagiri

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

Print EURO sign

Post by hynan »

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: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Print EURO sign

Post by mol »

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

Re: Print EURO sign

Post by Italia1 »

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: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Print EURO sign

Post by Pablo César »

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: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: Print EURO sign

Post by mustafa »

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: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Print EURO sign

Post by Pablo César »

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: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Print EURO sign

Post by Pablo César »

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: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: Print EURO sign

Post by mustafa »

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 9406 times
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Print EURO sign

Post by Pablo César »

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