Click here to Skip to main content
15,569,774 members

Comments by Daniel Pfeffer (Top 41 by date)

Daniel Pfeffer 26-Dec-22 14:36pm View    
Chess engines have been written in many languages, the choice of language being determined more by the environment than anything else. If one wishes to have a program that runs in a browser, that limits one to the languages and frameworks available in a browser. If one wishes to have a program that runs on a desktop the choice of languages is wider, but it will run only in the target O/S.
Daniel Pfeffer 25-Dec-22 13:14pm View    
There is a publicly available program, ghidra, produced by the NSA (of all places!) that can do a fairly decent job of converting an object (.o) file to C. To download it, you need to use a VPN that identifies you as being in the US, but there are no other restrictions on the download.

Decompilation is an iterative process - you identify parts of the code / data, and then modify a configuration file so the program will take your identification into account, and repeat.
Daniel Pfeffer 15-Dec-22 2:24am View    
Any basic tutorial on network protocols will have a similar example. I suggest searching for "Internet Protocol Tutorial" or "UDP protocol tutorial".
Daniel Pfeffer 18-Sep-22 8:08am View    
I am not an SQL expert, but perhaps the problem is in the database schema. Are you certain that the strings stored in the database are Unicode strings? If they are ASCII strings, it is quite possible that the database won't recognize them - Arabic is not defined in ASCII.

See the following: https://learn.microsoft.com/en-us/sql/t-sql/data-types/data-types-transact-sql?view=sql-server-ver15
Daniel Pfeffer 4-Jul-22 3:15am View    
The MultiByteToWideChar() API is part of the Windows SDK, and requires including windows.h

There is a good example using C only here: https://en.cppreference.com/w/cpp/string/multibyte/mbstowcs

Please note that the string passed to setlocale() is compiler-dependent; you will have to consult your compiler's documentation to see how to set up a UTF-8 locale.