Search found 1262 matches

by Munair
Apr 05, 2022 7:13
Forum: Sources, Examples, Tips and Tricks
Topic: UTF-8 Variable Length String Library
Replies: 47
Views: 8001

Re: UTF-8 Variable Length String Library

Linux already speaks UTF-8 natively so I think there is no need for an UTF-8 library for it. FreeBASIC has no string manipulation routines built in that support unicode. For example, taking the first 10 characters of a string with LEFT(text, 10) really takes the first 10 bytes , which means that if...
by Munair
Apr 05, 2022 5:37
Forum: Sources, Examples, Tips and Tricks
Topic: UTF-8 Variable Length String Library
Replies: 47
Views: 8001

Re: UTF-8 Variable Length String Library

PCHAR is a windows data type. If windows.bi is included, PCHAR will be defined. This library having been developed on Linux is not aware of datatypes on other platforms. In any case, simply commenting out the definition in UTF8.bi will not be the solution, unless the definition is identical (zstrin...
by Munair
Apr 04, 2022 11:14
Forum: General
Topic: [SOLVED] Pass UTF-8 strings
Replies: 35
Views: 1312

Re: Pass UTF-8 strings

const char* translates to CONST ZSTRING PTR Example test_C_function(@"test 中国語") VAR c_str = @"test 中国語" '' creates a ZSTRING PTR test_C_function(c_str) ?LEFT(*c_str, 4) ?MID(*c_str, 6) The UTF8 library pointed to by Vortex has both zstring ptr and const zstring ptr defined as: ...
by Munair
Apr 04, 2022 11:01
Forum: Sources, Examples, Tips and Tricks
Topic: UTF-8 Variable Length String Library
Replies: 47
Views: 8001

Re: UTF-8 Variable Length String Library

utf8.bi(30) error 4: Duplicated definition in 'type PChar as zstring ptr' Comment out this line get rid of the error. When compiling examples.bas or utf8.bas (both including utf8.bi) I'm not getting this error. As far as I can see there's no duplicate definition of PChar. Did you include utf8.bi in...
by Munair
Mar 15, 2022 8:26
Forum: General
Topic: Feature Request
Replies: 5
Views: 357

Re: Feature Request

Versions LTRIMN and RTRIMN without looped string (re)allocation: ' code by munair 15-3-2022 ' ------------------------ function ltrimn(s as string, c as string, n as uinteger) as string dim l as uinteger = len(s) ' string length dim p as uinteger = 0 ' position in string dim t as uinteger = 0 ' trim...
by Munair
Feb 24, 2022 13:58
Forum: Community Discussion
Topic: Observations.
Replies: 138
Views: 10715

Re: Observations.

I@Munair, if we didn't have moderators, nobody would be banned and the forum would continue to accumulate a junk pile of harmful and unrelated posts. That is a ridiculous response. Nowhere did I suggest that there shouldn't be moderators. My 2 cents to jj2007: To ban him permanently was an overreac...
by Munair
Feb 24, 2022 7:10
Forum: Community Discussion
Topic: Observations.
Replies: 138
Views: 10715

Re: Observations.

The question is, would jj2007 have been banned without paul doe as a moderator? Probably not. And that is the problem I have with a community. A permanent ban, especially someone who's been a member for several years, is radical and should be discussed thoroughly rather than being done in hastiness....
by Munair
Feb 23, 2022 22:25
Forum: Community Discussion
Topic: Observations.
Replies: 138
Views: 10715

Re: Observations.

Yes, jj's first answer in that thread wasn't really helpful, but it wasn't really annoying either. I very much agree. What I view with some doubt is the short interval between warning, temporary ban and permanent ban. Also considering jj has been a member for many years. Valid points, which is why ...
by Munair
Feb 23, 2022 19:32
Forum: Community Discussion
Topic: Bugs
Replies: 71
Views: 3135

Re: Bugs

fxm wrote: Feb 23, 2022 19:13 A simple workaround to return 'Cbool(x)' without any warning is to use instead 'Cbool(x <> 0)'.
Yes, because the argument is turned into an expression, which basically has the same effect as passing a variable: no range check.
by Munair
Feb 23, 2022 17:21
Forum: Community Discussion
Topic: Observations.
Replies: 138
Views: 10715

Re: Observations.

That being said, I deem MrSwiss far more worthy of being reinstated than jj2007. MrSwiss attitude wasn't all that good, but at least he was truly helpful . MrSwiss' attitude towards others wasn't great to put it mildly. jj2007 on the other hand was mostly friendly towards others and his only "...
by Munair
Feb 23, 2022 16:02
Forum: Community Discussion
Topic: Observations.
Replies: 138
Views: 10715

Re: Observations.

deltarho[1859] wrote: Feb 23, 2022 15:20 Some guys at PowerBASIC waned me to change my spell checker to American English.

My response was decidedly colourful, very blue in fact. :)
I could throw in some Dutch and some of it would be close to old English, but I doubt the spell checker would appreciate it. :D
by Munair
Feb 23, 2022 14:42
Forum: Community Discussion
Topic: Observations.
Replies: 138
Views: 10715

Re: Observations.

Colorful? Interesting because that is American English and your spell checker is not complaining. My spell checker complains with 'colour'. My browser's spell checker is set to US English. If I change it to British I get lots of red underlined words in many cases. Guess British English has become s...
by Munair
Feb 23, 2022 14:14
Forum: Community Discussion
Topic: Bugs
Replies: 71
Views: 3135

Re: Bugs

PowerBASIC is not open source, so I doubt that we ever know how Bob mangaged to get his string handling functions to run so fast. Since November I've been working on implementing strings (const, var and fixed). What I've been very keen on is to only copy a string if really necessary (e.g. to break ...
by Munair
Feb 23, 2022 13:33
Forum: Community Discussion
Topic: Observations.
Replies: 138
Views: 10715

Re: Observations.

@deltarho, I really like your colorful language.
by Munair
Feb 23, 2022 13:28
Forum: Community Discussion
Topic: Bugs
Replies: 71
Views: 3135

Re: Bugs

dodicat wrote: Feb 23, 2022 13:11 Munair, make sure your sharpbasic takes the powerbasic path on this one.
I'll do my best, although I'm not at all familiar with PowerBasic. But I do know its history and the author's background.