For the record, PB uses UCS2 string encoding internally when unicode mode is ON (it doesn't support multibyte UTF16 encoding).
Does this mean that if Windows passes back a UTF-16 string where one character actually uses two UTF-16 "characters" then PureBasic will treat them as if they where two ...
Search found 1663 matches
- Wed Mar 25, 2015 12:56 pm
- Forum: Coding Questions
- Topic: PureBASIC internal encoding of unicode, UCS-2 or UTF-16?
- Replies: 7
- Views: 5031
- Wed Mar 25, 2015 4:40 am
- Forum: General Discussion
- Topic: Unicode and PureBasic
- Replies: 29
- Views: 123392
Re: Unicode and PureBasic
From wikipedia: http://en.wikipedia.org/wiki/UTF-16
UTF-16 developed from an earlier fixed-width 16-bit encoding known as UCS-2 (for 2-byte Universal Character Set) once it became clear that a fixed-width 2-byte encoding could not encode enough characters to be truly universal.
UTF-16 is used ...
UTF-16 developed from an earlier fixed-width 16-bit encoding known as UCS-2 (for 2-byte Universal Character Set) once it became clear that a fixed-width 2-byte encoding could not encode enough characters to be truly universal.
UTF-16 is used ...
- Mon Mar 23, 2015 9:56 pm
- Forum: Announcement
- Topic: BASS audio library v2.4.11 and PureBasic 5.31 includes
- Replies: 12
- Views: 11604
BASS audio library v2.4.11 and PureBasic 5.31 includes
http://www.un4seen.com/
Click on BASS in the menu on the left, then scroll down to "Other APIs" and there you should find a download link for "Pure Basic API".
BASS is an audio library for use in Windows and Mac OSX software. Its purpose is to provide developers with powerful and efficient sample ...
Click on BASS in the menu on the left, then scroll down to "Other APIs" and there you should find a download link for "Pure Basic API".
BASS is an audio library for use in Windows and Mac OSX software. Its purpose is to provide developers with powerful and efficient sample ...
- Tue Jan 06, 2015 11:53 pm
- Forum: Feature Requests and Wishlists
- Topic: Constant request: #LOREM$
- Replies: 27
- Views: 11757
Re: Constant request: #LOREM$
It is also possible to do this:
Procedure.s RandomText1(length.l)
Protected *mem, i.i, *text.Ascii, text$
*mem = AllocateMemory(length, #PB_Memory_NoClear)
RandomData(*mem, length)
*text = *mem
For i = 1 To length
If *text\a > 122
*text\a = *text\a & $3F
EndIf
If *text\a < 33
*text\a ...
Procedure.s RandomText1(length.l)
Protected *mem, i.i, *text.Ascii, text$
*mem = AllocateMemory(length, #PB_Memory_NoClear)
RandomData(*mem, length)
*text = *mem
For i = 1 To length
If *text\a > 122
*text\a = *text\a & $3F
EndIf
If *text\a < 33
*text\a ...
- Tue Jan 06, 2015 10:35 pm
- Forum: Feature Requests and Wishlists
- Topic: RemoveKeyboardShortcut(#PB_Shortcut_Revert)
- Replies: 3
- Views: 2659
Re: RemoveKeyboardShortcut(#PB_Shortcut_Revert)
It might "look" better if it's called RemoveKeyboardShortcut(#PB_Default) instead of revert.
Alternatively allow #PB_Default to be used with AddKeyboardShortcut() provided the constant do not clash with any existing keyboard shortcuts that is (I haven't checked).
Alternatively allow #PB_Default to be used with AddKeyboardShortcut() provided the constant do not clash with any existing keyboard shortcuts that is (I haven't checked).
- Tue Jan 06, 2015 10:24 pm
- Forum: General Discussion
- Topic: Trojan detected
- Replies: 12
- Views: 6785
Re: Trojan detected
In compiler options under "Compile/Run" there is a option "Create temporary executable in the source directory", enable that, compile and find the exe in the directory of your source file.
- Mon Jan 05, 2015 11:21 pm
- Forum: General Discussion
- Topic: Sticky post needed that discusses Unicode vs Ascii
- Replies: 3
- Views: 2962
Re: Sticky post needed that discusses Unicode vs Ascii
This is not a migration issue.
The hash functions always operated on memory, none of them operate on strings the are binary only.
The fact that MD5FingerPrint returns a hex string might make people assume it's for getting the hash of a string, but it's not.
This "issue" dates back to Windows 2000 ...
The hash functions always operated on memory, none of them operate on strings the are binary only.
The fact that MD5FingerPrint returns a hex string might make people assume it's for getting the hash of a string, but it's not.
This "issue" dates back to Windows 2000 ...
- Mon Jan 05, 2015 10:45 pm
- Forum: Tricks 'n' Tips
- Topic: Protection process
- Replies: 14
- Views: 8753
Re: Protection process
FIY, for those curious it should be possible to achieve the same using Windows permissions, that way a system admin can prevent users from killing programs. I can't recall exactly where you set these permissions but some else here might now.
Then again, if you make sure a user is a regular user (i.e ...
Then again, if you make sure a user is a regular user (i.e ...
- Mon Jan 05, 2015 10:38 pm
- Forum: Tricks 'n' Tips
- Topic: GetGadgetColumns(), GadgetMouseX(), GadgetMouseY()
- Replies: 3
- Views: 3227
Re: GetGadgetColumns(), GadgetMouseX(), GadgetMouseY()
FIY a "mouse pusher" may include those who use:
A Mouse
A Trackball
A 3DNavigator
A Touchpad
A Touchscreen
A Drawingpad
A Digital Pen
A Lightpen / A Lightgun
A Joystick
A Gamepad
A Steamcontroller (which has two "touchpads")
A Disabilitydevice of some sort.
A device type I forgot to mention, there ...
A Mouse
A Trackball
A 3DNavigator
A Touchpad
A Touchscreen
A Drawingpad
A Digital Pen
A Lightpen / A Lightgun
A Joystick
A Gamepad
A Steamcontroller (which has two "touchpads")
A Disabilitydevice of some sort.
A device type I forgot to mention, there ...
- Mon Jan 05, 2015 10:16 pm
- Forum: Coding Questions
- Topic: RemoveKeyboardShortcut with #PB_Shortcut_All kills tab
- Replies: 4
- Views: 2752
Re: RemoveKeyboardShortcut with #PB_Shortcut_All kills tab
If I recall correctly, the reason why RemoveKeyboardShortcut() and #PB_Shortcut_All removes the TAB as well, was that some developers wanted/needed to re-purpose the TAB key or "disable" it, and this is the only way to do that (IIRC).
- Sat Dec 20, 2014 4:48 pm
- Forum: Coding Questions
- Topic: How can I obtain my internet address?
- Replies: 62
- Views: 36279
Re: How can I obtain my internet address?
Do note that the IP may not be guaranteed.
For example your LAN may use 192.168.x.x and then your WAN and ISP may use 172.x.x.x and so on, depending on the ISP you may actually be behind a ISP NAT, and I think (my router knowledge is limited when it comes to NAT) it is possible that two machines (or ...
For example your LAN may use 192.168.x.x and then your WAN and ISP may use 172.x.x.x and so on, depending on the ISP you may actually be behind a ISP NAT, and I think (my router knowledge is limited when it comes to NAT) it is possible that two machines (or ...
- Sat Dec 20, 2014 4:35 pm
- Forum: Coding Questions
- Topic: FileBuffersSize(#PB_Default, 0) does not work.
- Replies: 10
- Views: 4947
Re: FileBuffersSize(#PB_Default, 0) does not work.
For those interested, this might be worth looking at http://www.purebasic.fr/english/viewtopic.php?f=27&t=61273
The source there behaves as expected and shows how to do unbuffered reads of individual files (on Windows only, sorry, no idea on how to do that on Linux) so one won't end up like me and ...
The source there behaves as expected and shows how to do unbuffered reads of individual files (on Windows only, sorry, no idea on how to do that on Linux) so one won't end up like me and ...
- Sat Dec 20, 2014 4:24 pm
- Forum: Applications - Feedback and Discussion
- Topic: Readspeed Test v3.0 HD/OS buffered and unbuffered speeds.
- Replies: 0
- Views: 2867
Readspeed Test v3.0 HD/OS buffered and unbuffered speeds.
This is based on the code from here v2.x but v3 is Windows only, sorry about that.
The issue with measuring read speed from HDD/SSD/SATA/USB devices is that Windows has a very aggressive cache. From that thread Fred says "IIRC Windows uses its whole free memory as disk cache. It's shadow mem, which ...
The issue with measuring read speed from HDD/SSD/SATA/USB devices is that Windows has a very aggressive cache. From that thread Fred says "IIRC Windows uses its whole free memory as disk cache. It's shadow mem, which ...
- Sat Dec 20, 2014 7:35 am
- Forum: Coding Questions
- Topic: FileBuffersSize(#PB_Default, 0) does not work.
- Replies: 10
- Views: 4947
Re: FileBuffersSize(#PB_Default, 0) does not work.
Actually, Shield's interpretation is more congruent with #2. Your's is #1. :wink:
*sigh*
Re-read my first post again.
Here is a full sourcecode http://www.purebasic.fr/english/viewtopic.php?f=27&t=37518
If you look at line 69 and line 89 you will see that "FileBuffersSize(fh, 0)".
I previously ...
*sigh*
Re-read my first post again.
Here is a full sourcecode http://www.purebasic.fr/english/viewtopic.php?f=27&t=37518
If you look at line 69 and line 89 you will see that "FileBuffersSize(fh, 0)".
I previously ...
- Sat Dec 20, 2014 7:06 am
- Forum: Coding Questions
- Topic: FileBuffersSize(#PB_Default, 0) does not work.
- Replies: 10
- Views: 4947
Re: FileBuffersSize(#PB_Default, 0) does not work.
FileBuffersSize(#PB_Default, 0)
WriteString(1, text$) ;this file will still utilise the 4K file buffer
CreateFile(3, "file3.txt") ;this file will not utilise any file buffer[/code]
Wrong, that is not my code at all. Please re-read my first post.
My code is/what I said was...
FileBuffersSize ...
WriteString(1, text$) ;this file will still utilise the 4K file buffer
CreateFile(3, "file3.txt") ;this file will not utilise any file buffer[/code]
Wrong, that is not my code at all. Please re-read my first post.
My code is/what I said was...
FileBuffersSize ...