Created
June 26, 2023 22:40
-
-
Save FlyTechVideos/ac708e977bd2aa73861b1936bf757255 to your computer and use it in GitHub Desktop.
Calls IsTextUnicode from the WinAPI to figure out whether or not a text is recognized as Unicode. Meant for use in Windows XP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
#include <windows.h> | |
#include <iostream> | |
using namespace std; | |
int main(int argc, char *argv[]) | |
{ | |
cout << "\r\n"; | |
if (argc != 2) { | |
cout << " Usage: " << argv[0] << " \"Text to verify\"\r\n\r\n"; | |
return 1; | |
} | |
char* string_to_check = argv[1]; | |
char* result = IsTextUnicode(string_to_check, strlen(string_to_check), NULL) == 1 ? "YES" : "NO"; | |
cout << " String: " << string_to_check << endl; | |
cout << " IsTextUnicode: " << result; | |
std::cout << "\r\n\r\n"; | |
return 0; | |
} |
Can you add an EXE version for Windows 10?
yes you can, the code works in windows 10 too
Can you add an EXE version for Windows 10?
yes you can, the code works in windows 10 too
Yes, it does work in Windows 10 too, just keep in mind that the fault in the function was fixed. Therefore, "Bush hid the facts" and similar strings don't trigger a false positive anymore.
does it work on windows 11
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you add an EXE version for Windows 10?