Hi,

So you're using UNICODE build.

Two things have changed in recent versions:

1. MSVC 2005 and above will have UNICODE mode turned on by default.
This may cause such sort of change in behavior you described, and it's
   intentionally turned on so that this mode, which is the future, be
   tested and app code adapted where needed.
In UNICODE mode some things, in particular encoding handling may behave a little bit differently than in non-UNICODE, since Harbour has to do
   the CP conversion, rather than Windows itself.
2. Some forced ANSI WINAPI calls have been changed to use WIDE calls in
   UNICODE mode to make above described behavior consistent.

Your issue is probably caused by 1., which can mean two things:

a. UNICODE mode may not work without bugs in all places in Harbour.
   I hope these issues to be detected and fixed, if needed.
b. Even if UNICODE mode is bug-free, app level fixes may be
   required, such as properly setting codepage.

I hope UNICODE is not my personal pet in Harbour, so I also hope
others will comment on these issues, too. In fact I just switched
to UNICODE with recent builds also.

Finally I hope 3rd party developers will also recognize the
advantages of UNICODE mode and will eventually be synced with
core Harbour behavior in this aspect, like respecting Harbour
CP when doing conversions and using WIDE versions of functions
in UNICODE mode.

The goal is to have the same app code work without changes in
both UNICODE and non-UNICODE mode. This opens the door for such
future Harbour features, like internal UNICODE strings, which
seems like the ultimate goal.

Brgds,
Viktor

On 2009 Oct 18, at 13:38, Itamar Lins wrote:

Hi,
Thanks for response.
I am using:
D:\harbour\trunk\harbour>harbour -build
Harbour 2.0.0beta3 (Rev. 12721)
Copyright (c) 1999-2009, http://www.harbour-project.org/

Harbour Build Info
---------------------------
Version: Harbour 2.0.0beta3 (Rev. 12721)
Compiler: Microsoft Visual C++ 15.0.26569 (32-bit)
Platform: Windows XP 5.1.2600 Service Pack 3
PCode version: 0.2
ChangeLog last entry: 2009-10-17 01:22 UTC+0200 Przemyslaw Czerpak
(druzus/at/pr
iv.onet.pl)
ChangeLog ID: ChangeLog 12721 2009-10-16 23:22:41Z druzus

Built on: Oct 17 2009 10:50:48
Build options: (C++ mode)
Language options: (Clipper 5.3) (Clipper 5.x undoc) (Xbase++) (Flagship)
---------------------------

My CodePage is:
hb_setcodepage([PTISO])
hb_langselect([PT])

Ps. a few versions ago worked fine.

Best regards,
Itamar M. Lins Jr.


"Viktor Szakáts" <harbour...@syenar.hu>
escreveu na mensagem news:3920b91e-b0b4-4f1a-812c-1ca73cdf1...@syenar.hu ...
Hi Itamar,

Exactly which compiler did you use here?

In UNICODE builds you have to use Set( _SET_CODEPAGE )
to set the CP you use in your app probably.
Maybe other will have better suggestions.

Brgds,
Viktor

On 2009 Oct 17, at 17:04, Itamar Lins wrote:

Hi!

Function Test_Charset

   oPrn := win_prn():New(GetDefaultPrinter())
   oPrn :LandScape := .f.
   oPrn :Copies    :=  1
   if !oPrn:Create()
      MsgStop("Fail...")
      return nil
   endif

   if !oPrn:StartDoc("Print...")
         MsgStop("Error...")
         return nil
   else
         oPrn:CharSet(255)
         oPrn:setfont('Lucida Console',,11,,,,255)
   endif
oPrn:TextOut
('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
»',.t.)
oPrn:EndDoc()

Before run ok show =======, now show wrong results 'ÍÍÍÍÍÍÍÍÍ' in paper
of
print.


Best regards,
Itamar M. Lins Jr.





_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour



_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to