Page 1 of 1

Print EURO sign

Posted: Mon Sep 09, 2013 6:11 am
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

Re: Print EURO sign

Posted: Mon Sep 09, 2013 8:12 am
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

Re: Print EURO sign

Posted: Wed Apr 16, 2014 3:11 pm
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. :)

Print EURO sign

Posted: Wed Apr 16, 2014 6:04 pm
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 ?

Re: Print EURO sign

Posted: Wed Apr 16, 2014 6:39 pm
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

Print EURO sign

Posted: Wed Apr 16, 2014 6:54 pm
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.

Print EURO sign

Posted: Wed Apr 16, 2014 8:00 pm
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.

Re: Print EURO sign

Posted: Wed Apr 16, 2014 8:06 pm
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

Print EURO sign

Posted: Wed Apr 16, 2014 8:31 pm
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