re : Pound Sign and Char 194

Xbase++ 2.0 Build 554 or later
Post Reply
Message
Author
clp1000
Posts: 14
Joined: Wed Jan 04, 2023 2:18 am

re : Pound Sign and Char 194

#1 Post by clp1000 »

Hello
I have this simple function below. It works perfectly in some of my PRGs, but not all of them.
I can copy this function as it is, and put it in another PRG, compile it and then when called/executed, it will add a character (194) before the pound sign in the final CSV file
Exactly the same function, in the same EXE, called in the same way.... but with differnet results

I cannot see any logical reason why ? Has anyone had anything simlar ? Any clues / ideas ?
I know I can swap the pound for chr(163) - but this won't solve the problem in future
Thanks
Chris

FUNCTION TestFunction()
qrepfile="c:\temp\test01.csv"
set alternate to (qrepfile)
set alternate on
set console off

?
? "£"
?

set alternate to
set alternate off
set console on
return .t.

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

Re: re : Pound Sign and Char 194

#2 Post by rdonnay »

Have you tried SET CHARSET TO ANSI ?
The eXpress train is coming - and it has more cars.

clp1000
Posts: 14
Joined: Wed Jan 04, 2023 2:18 am

Re: re : Pound Sign and Char 194

#3 Post by clp1000 »

Yes, tried that, no difference, thanks
But anyway it wouldn't explain why it would work in 1 PRG file and not the other 1

User avatar
Auge_Ohr
Posts: 1422
Joined: Wed Feb 24, 2010 3:44 pm

Re: re : Pound Sign and Char 194

#4 Post by Auge_Ohr »

hi,

did we talk about Console or GUI ?

have you change AppSys() ?
which FONT do you use ?

---

have a look at SetLocale() in help File
it have a Sample for Euro Sign (check it) but you can enhance it for Pound Sign
greetings by OHR
Jimmy

k-insis
Posts: 120
Joined: Fri Jan 28, 2011 4:07 am

Re: re : Pound Sign and Char 194

#5 Post by k-insis »

One file is in ANSI and second source file in UTF encoding.
clp1000 wrote: Wed Mar 29, 2023 10:24 am Hello
I have this simple function below. It works perfectly in some of my PRGs, but not all of them.
I can copy this function as it is, and put it in another PRG, compile it and then when called/executed, it will add a character (194) before the pound sign in the final CSV file
Exactly the same function, in the same EXE, called in the same way.... but with differnet results

I cannot see any logical reason why ? Has anyone had anything simlar ? Any clues / ideas ?
I know I can swap the pound for chr(163) - but this won't solve the problem in future
Thanks
Chris

FUNCTION TestFunction()
qrepfile="c:\temp\test01.csv"
set alternate to (qrepfile)
set alternate on
set console off

?
? "£"
?

set alternate to
set alternate off
set console on
return .t.

clp1000
Posts: 14
Joined: Wed Jan 04, 2023 2:18 am

Re: re : Pound Sign and Char 194

#6 Post by clp1000 »

k-insis wrote: Thu Mar 30, 2023 12:06 am One file is in ANSI and second source file in UTF encoding.
clp1000 wrote: Wed Mar 29, 2023 10:24 am Hello
I have this simple function below. It works perfectly in some of my PRGs, but not all of them.
I can copy this function as it is, and put it in another PRG, compile it and then when called/executed, it will add a character (194) before the pound sign in the final CSV file
Exactly the same function, in the same EXE, called in the same way.... but with differnet results

I cannot see any logical reason why ? Has anyone had anything simlar ? Any clues / ideas ?
I know I can swap the pound for chr(163) - but this won't solve the problem in future
Thanks
Chris

FUNCTION TestFunction()
qrepfile="c:\temp\test01.csv"
set alternate to (qrepfile)
set alternate on
set console off

?
? "£"
?

set alternate to
set alternate off
set console on
return .t.
You sir, are a genius - thanks a million

Thanks for all the replies from everyone

Post Reply