>Dear Hilmar
>I get your sample and test it. because my language is persian i use from codepage 1256.
>When i print my report all persian character wascurropted.
>I read your code and see below line in MYFUNCTIONS.PRG :
>
>lcFileInRam = tcMargin + strtran(CpConvert(1252, 437, lcFileInRam),;
>CRLF, CRLF + tcMargin)
>
>this line chang the codepage to 437. WHY?
>can i change 437 to 1256?
>
>when i bypass this line and check lcFileInRam content everything is correct.
>
>but when lcFileInRam content is printed with ??? my persian character curropt again.WHY?
>
>can you help me?
>Thanks
Yes, that is correct, I didn't consider non-Latin languages.
In Windows, I use codepage 1252. But to print to a printer in text-mode, I convert to codepage 437. Basically, this is the codepage used by the printer. Check your printer manual, if other codepages are supported.
Otherwise, I don't know; perhaps printing in text-mode is not an option for you, because you don't use the Latin character set. This means you may have to print in graphic mode.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)