Display issue with 2.0

Xbase++ 2.0 Build 554 or later
Message
Author
bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Display issue with 2.0

#1 Post by bwolfsohn »

The following code has worked for the past 10 years... it is displaying properly under 1.9SL1 (355) the british pound sign does not display properly in xbase++2.0

CREATEGET @PRO_CURRENCY ;
ROW @xx ITEM @num NSAYCOL Saycol NGETCOL getcol+1.5 ;
PICTURE "X";
VALID {|| PRO_CURRENCY$"123 " } ;
PROMPT "Enter currency Designation 1 = US ($) 2 = British (œ) 3 = Euro - (Leave Blank for None)" ;
MESSAGE 'Enter 1 for US Dollar ($) or 2 for British pound (œ) 3 for Euro '

this is all preprocessed into a dcsay/get

has anyone else come across this ??
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Display issue with 2.0

#2 Post by rdonnay »

Are you using SetLocale() to set the currency?
The eXpress train is coming - and it has more cars.

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Display issue with 2.0

#3 Post by Cliff Wiernik »

I have not encountered this, but I have other items.

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Display issue with 2.0

#4 Post by bwolfsohn »

rdonnay wrote:Are you using SetLocale() to set the currency?

only for euro

Code: Select all

IF PRO_CURRENCY=="3"
  SetLocale( NLS_SCURRENCY, Chr(213) )
  SetLocale( NLS_ICURRENCYEURO, "1" )
ELSE
  SetLocale( NLS_SCURRENCY, "$" )
  SetLocale( NLS_ICURRENCYEURO, "0" )
ENDIF

Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Display issue with 2.0

#5 Post by bwolfsohn »

bwolfsohn wrote:
rdonnay wrote:Are you using SetLocale() to set the currency?

only for euro

Code: Select all

IF PRO_CURRENCY=="3"
  SetLocale( NLS_SCURRENCY, Chr(213) )
  SetLocale( NLS_ICURRENCYEURO, "1" )
ELSE
  SetLocale( NLS_SCURRENCY, "$" )
  SetLocale( NLS_ICURRENCYEURO, "0" )
ENDIF

bump...

I've tried
setlocale(NLS_SCURRENCY,"œ") // this s/b the pound sign.. When i paste this into xdot, it shows the lb sign, but it doesn't work... it returns a lower case o
the asc of œ is 111

when i originally wrote this in clipper, it worked.... :clap:
but in 2.0, it doesn't :naughty:

has anyone figured this out ?? :pray:
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

reganc
Posts: 257
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: Display issue with 2.0

#6 Post by reganc »

In most of our dialogs we do not actually display a pound sign.

But I do have a couple of dialogs that do display one and in those (in a DCSAY) I have to use ConvToOEMCP(<string including pound sign>) to get it to show correctly.
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Display issue with 2.0

#7 Post by bwolfsohn »

Reagan,

Thanks for the approach...

We use it more for printing invoices.. it's displayed in a few places, but bills are the key...
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Display issue with 2.0

#8 Post by bwolfsohn »

reganc wrote:In most of our dialogs we do not actually display a pound sign.

But I do have a couple of dialogs that do display one and in those (in a DCSAY) I have to use ConvToOEMCP(<string including pound sign>) to get it to show correctly.
It doesn't appear to work by itself, xdot still display a lower case o

are you using SET_CHARSET or localeconfigure() ??

I'm unable to test ? localeconfigure() in xdot since it throws an error...
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

reganc
Posts: 257
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: Display issue with 2.0

#9 Post by reganc »

bwolfsohn wrote:
reganc wrote:In most of our dialogs we do not actually display a pound sign.

But I do have a couple of dialogs that do display one and in those (in a DCSAY) I have to use ConvToOEMCP(<string including pound sign>) to get it to show correctly.
It doesn't appear to work by itself, xdot still display a lower case o

are you using SET_CHARSET or localeconfigure() ??

I'm unable to test ? localeconfigure() in xdot since it throws an error...
I don't use localeconfigure or SET CHARSET TO at all. Or XDot really.

On that dialog I have this DCSAY:

@ nRow,nCol DCSAY {|| UPLIFT_Disp_Value(iif(aTakings[TAK_EL_FO_VALUE]<>0,aTakings[TAK_EL_FO_VALUE],aTakings[TAK_EL_FO_ARRAY_TOTAL])) } ;
SIZE Rba_Col(12),Rba_GetHeight(1) ;
COLOR GRA_CLR_BLACK , Say_Field_Color() ;
OPTIONS XBPALIGN_RIGHT + XBPALIGN_VCENTER ;
ID "FO_TOTAL"

and the following function is the one used:

STATIC FUNCTION UPLIFT_Disp_Value(nValue)

LOCAL cValue

nValue := round(nValue,2)
if nValue < 0
cValue:="-£"+ntrim(abs(nValue),,2)
else
cValue:="£"+ntrim(nValue,,2)
endif
RETURN ConvToOEMCP(cValue)

The DCSAY on the dialog shows the pound sign followed immediately by the value to 2 decimal places. I have made a couple of small mods to remove some stuff to make it easier to read.

Incidentally, in your 1st post above, the pound sign in the PROMPT string shows as an 'oe' character in brackets...
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Display issue with 2.0

#10 Post by bwolfsohn »

reganc wrote:
bwolfsohn wrote:
reganc wrote:Incidentally, in your 1st post above, the pound sign in the PROMPT string shows as an 'oe' character in brackets...
In xdot, when i ask it ? pound sign symbol, that is how it displays... :(
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

Post Reply