Author | Topic: XbpPresSpace() of XbpPrinter() Question | |
---|---|---|
Carlos A Beling | XbpPresSpace() of XbpPrinter() Question on Fri, 12 Feb 2016 19:36:33 -0200 Good night. . I have a Xbprinter() object. . I created a XbpPresSpace() using as <oDevice> XbpPrinter() (ie.: oPrintPs := XbpPresSpace():new():create(oPrinter,...) . I draw the strings using GraStringAt(oPrintPs, aStrinPos, cString) . cString is in charset ANSI Please, can someone say to me why cString is rendered as charset OEM? What Can I do for to render it in charset ANSI? Fraternally Beling | |
Andreas Gehrs-Pahl | Re: XbpPresSpace() of XbpPrinter() Question on Fri, 12 Feb 2016 22:02:21 -0500 Carlos, >cString is in charset ANSI Are you sure about this? Is this is a literal string or does it come from a data source or from user input? >Please, can someone say to me why cString is rendered as charset OEM? What is your application's CharSet setting? The string will be rendered based on the CharSet setting and might be subject to implicit (automatic) conversion. You can RTFM under "SET CHARSET" for details. >What Can I do for to render it in charset ANSI? Depending on your application's setting and the source and target of the string, you could probably use: "Set CharSet to ANSI" before you print, or you could use: "GraStringAt(oPrintPs, aStrinPos, ConvToAnsiCP(cString))" if your application needs to use "Set CharSet to OEM". Hope that helps, Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas.GP@Charter.net web: http://www.Aerospace-History.net | |
Carlos A Beling | Re: XbpPresSpace() of XbpPrinter() Question on Sat, 13 Feb 2016 13:17:06 -0200 Hello Andreas. Good afternoon. Many thanks. . The AppSys() makes Set(_SET_CHARSET,CHARSET_ANSI) . The string is a constant string (ie: 'ção') . The first one statement in the class that I use for printing (the class is derived from Thread()) is Set(_SET_CHARSET, CHARSET_ANSI) in the method :init() I will need to debug the app for to know if it has any charset changing. Fraternally Beling On 13/2/2016 01:02, Andreas Gehrs-Pahl wrote: > Carlos, > >> cString is in charset ANSI > > Are you sure about this? Is this is a literal string or does it come from a > data source or from user input? > >> Please, can someone say to me why cString is rendered as charset OEM? > > What is your application's CharSet setting? The string will be rendered > based on the CharSet setting and might be subject to implicit (automatic) > conversion. You can RTFM under "SET CHARSET" for details. > >> What Can I do for to render it in charset ANSI? > > Depending on your application's setting and the source and target of the > string, you could probably use: "Set CharSet to ANSI" before you print, or > you could use: "GraStringAt(oPrintPs, aStrinPos, ConvToAnsiCP(cString))" > if your application needs to use "Set CharSet to OEM". > > Hope that helps, > > Andreas > | |
Carlos A Beling | Re: XbpPresSpace() of XbpPrinter() Question - Feedback on Thu, 18 Feb 2016 12:40:35 -0200 Hello Andreas: good afternoon. After long study I discovered the problem that I reported here. The problem is how you start the thread. If someone wants to see the problem is only to compile the test.prg attached. There are the files below in the attached file: 1) Printfor.prg -> is the thread that was used for to print the report. 2) Project.xpj 3) PrtFuncs.prg -> auxiliary functions 4) Report.zip -> contains the formated report for to be interpreted if the original had been deleted 5) Test.prg -> for testing. Please take a look at it before to test 6) Wk5CAAC7.prn -> the original report Fraternally Beling On 13/2/2016 13:17, Carlos A Beling wrote: > Hello Andreas. > Good afternoon. > Many thanks. > > . The AppSys() makes Set(_SET_CHARSET,CHARSET_ANSI) > . The string is a constant string (ie: 'ção') > . The first one statement in the class that I use for printing (the > class is derived from Thread()) is Set(_SET_CHARSET, CHARSET_ANSI) in > the method :init() > > I will need to debug the app for to know if it has any charset changing. > > Fraternally > Beling > > > On 13/2/2016 01:02, Andreas Gehrs-Pahl wrote: >> Carlos, >> >>> cString is in charset ANSI >> >> Are you sure about this? Is this is a literal string or does it come >> from a >> data source or from user input? >> >>> Please, can someone say to me why cString is rendered as charset OEM? >> >> What is your application's CharSet setting? The string will be rendered >> based on the CharSet setting and might be subject to implicit (automatic) >> conversion. You can RTFM under "SET CHARSET" for details. >> >>> What Can I do for to render it in charset ANSI? >> >> Depending on your application's setting and the source and target of the >> string, you could probably use: "Set CharSet to ANSI" before you >> print, or >> you could use: "GraStringAt(oPrintPs, aStrinPos, ConvToAnsiCP(cString))" >> if your application needs to use "Set CharSet to OEM". >> >> Hope that helps, >> >> Andreas >> Test.zip |