Search found 31 matches

by simkot
Sun Mar 23, 2025 4:32 pm
Forum: Coding Questions
Topic: How to speed up array creation
Replies: 9
Views: 513

Re: How to speed up array creation

pjay wrote: Sun Mar 23, 2025 9:22 am Maybe you'd be better off just keeping it simple & reading your file line by line:
Thank you! Your code works great!
by simkot
Sun Mar 23, 2025 11:37 am
Forum: Coding Questions
Topic: How to speed up array creation
Replies: 9
Views: 513

Re: How to speed up array creation

Thank you. I will test your answers and let you know. Yes, the first code was not correct. Here is the code I am working on.
start_time = ElapsedMilliseconds()

If ReadFile(0, "test.txt")
bom = ReadStringFormat(0)
Size.q = Lof(0)
If Size > 0
*p = AllocateMemory(Size + 2)
If *p
ReadData(0, *p ...
by simkot
Sun Mar 23, 2025 7:36 am
Forum: Coding Questions
Topic: How to speed up array creation
Replies: 9
Views: 513

How to speed up array creation

There is a script for getting the value of a string from an array. It is designed to work with large files weighing from 300 mb, but creating a script takes a very long time. 10-20 times longer than in Autoit. Is it possible to speed it up?
If ReadFile(0, "test.txt")
bom = ReadStringFormat(0 ...
by simkot
Fri Mar 07, 2025 8:32 pm
Forum: Coding Questions
Topic: PureBasic and Windows scalability
Replies: 3
Views: 474

Re: PureBasic and Windows scalability

when I enable this option, the exe file does not run at all.
by simkot
Fri Mar 07, 2025 7:37 pm
Forum: Coding Questions
Topic: PureBasic and Windows scalability
Replies: 3
Views: 474

PureBasic and Windows scalability

Does PureBasic support Windows scalability?
by simkot
Wed Mar 05, 2025 12:35 pm
Forum: Feature Requests and Wishlists
Topic: WritePreferenceString and UTF8
Replies: 9
Views: 634

Re: WritePreferenceString and UTF8

AZJIO wrote: Wed Mar 05, 2025 12:30 pm Check by creating ini in UTF8 format without BOM. Theoretically, Openpreferences () should not add BOM.
Look in the reference file:
I tried this method. The file still converts to UTF8 BOM if I use WritePreferenceString.
by simkot
Wed Mar 05, 2025 12:33 pm
Forum: Feature Requests and Wishlists
Topic: WritePreferenceString and UTF8
Replies: 9
Views: 634

Re: WritePreferenceString and UTF8

AZJIO wrote: Wed Mar 05, 2025 12:03 pm CreatePreferences + #PB_Preference_NoBOM
I need to write to an existing file. And if I use CreatePreferences + #PB_Preference_NoBOM then the file will be overwritten and its contents will disappear.
by simkot
Wed Mar 05, 2025 11:32 am
Forum: Feature Requests and Wishlists
Topic: WritePreferenceString and UTF8
Replies: 9
Views: 634

WritePreferenceString and UTF8

The default WritePreferenceString writes to UTF BOM. How to make it writes to UTF8 without BOM?
by simkot
Fri Feb 28, 2025 1:27 pm
Forum: Coding Questions
Topic: What should ReadStringFormat(#File) return?
Replies: 17
Views: 1140

Re: What should ReadStringFormat(#File) return?

What does ANSI have to do with it? I meant either UTF8 or UTF BOM.
by simkot
Wed Feb 26, 2025 12:22 pm
Forum: Coding Questions
Topic: What should ReadStringFormat(#File) return?
Replies: 17
Views: 1140

Re: What should ReadStringFormat(#File) return?

Writing a program to convert text that offers to convert it in another program... I don't think this is serious.
by simkot
Wed Feb 26, 2025 7:11 am
Forum: Coding Questions
Topic: What should ReadStringFormat(#File) return?
Replies: 17
Views: 1140

Re: What should ReadStringFormat(#File) return?


There is no safe method to distinguish between ASCII and UTF8
But it is necessary to define.

Interesting, which other language can detect a UTF8 text file without BOM by a quick look at it?

For example, in Autotit it is solved by one line
FileGetEncoding ( "filehandle/filename" [, mode = 1 ...
by simkot
Tue Feb 25, 2025 7:31 pm
Forum: Coding Questions
Topic: What should ReadStringFormat(#File) return?
Replies: 17
Views: 1140

Re: What should ReadStringFormat(#File) return?

Thank you! Now it's clear. But how do you determine UTF8 without BOM? Can PureBasic do this?
by simkot
Tue Feb 25, 2025 7:14 pm
Forum: Coding Questions
Topic: What should ReadStringFormat(#File) return?
Replies: 17
Views: 1140

Re: What should ReadStringFormat(#File) return?

How to find out the values ​​of other constants?
This function is kind of strange. It probably defines the encoding, but not the whole one. It doesn't define the most common UTF8 without BOM. So what's the point of it?? In other languages, such obvious and everyday functions are presented much more ...
by simkot
Tue Feb 25, 2025 6:50 pm
Forum: Coding Questions
Topic: What should ReadStringFormat(#File) return?
Replies: 17
Views: 1140

What should ReadStringFormat(#File) return?

The help says that ReadStringFormat(#File) should return strings. For example, #PB_UTF16BE. But when I check a file in PB_UTF16BE encoding, it returns 4. For a file in UTF8, BOM returns 2. For ANSI - 24. How is that possible?
by simkot
Mon Feb 24, 2025 7:00 am
Forum: Announcement
Topic: PureAutoIt - Complete Autoit Functions In Purebasic
Replies: 32
Views: 34693

Re: PureAutoIt - Complete Autoit Functions In Purebasic

If If InitNetwork()I removed other errors appear. Is it possible to replace it with something else? Or how to use Zgku thenI removed other errors appear. Is it possible to replace it with something else? Or how to use PureAutoIt then?