Suggestion for UTF Warning

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
CalamityJames
User
User
Posts: 81
Joined: Sat Mar 13, 2010 4:50 pm

Suggestion for UTF Warning

Post by CalamityJames »

I suggest that for Purebasic 5.5 on that a warning should be given if a non-UTF program is opened. Such a feature would have saved me half an hour today when I forgot which version of PB I was using and a function using an external program stopped working. It might well save more half hours in the future!
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Suggestion for UTF Warning

Post by skywalk »

Prepend a warning to your code :wink:

Code: Select all

CompilerIf #PB_Compiler_Unicode = 0
  CompilerError "This app requires #PB_Compiler_Unicode = 1."
CompilerEndIf
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
CalamityJames
User
User
Posts: 81
Joined: Sat Mar 13, 2010 4:50 pm

Re: Suggestion for UTF Warning

Post by CalamityJames »

Sadly, it doesn't work in PB 5.5. It did work in 5.42 when I turned unicode off, but no error was thrown up in 5.5 (unicode obviously can't be turned off there).
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Suggestion for UTF Warning

Post by Little John »

CalamityJames wrote:I suggest that for Purebasic 5.5 on that a warning should be given if a non-UTF program is opened.
What do you mean with "non-UTF program"?
CalamityJames
User
User
Posts: 81
Joined: Sat Mar 13, 2010 4:50 pm

Re: Suggestion for UTF Warning

Post by CalamityJames »

Good Point. I mean non-unicode.
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Suggestion for UTF Warning

Post by Little John »

I see.
Yes, I agree that such a warning would be very helpful.
Post Reply