Search found 194 matches

by Natulux
Wed Oct 09, 2019 7:16 am
Forum: C++ Development
Topic: WebSocket Server
Replies: 2
Views: 122

Re: WebSocket Server

Just use libwebsockets in your application. You should be able to build it on all popular platforms, as a 3rd-party library which will be used for your app. Thank you for the hint! I'll have a look into it. I hope I can include this in my static build, but on first glance it provides everything I n...
by Natulux
Tue Oct 08, 2019 12:41 pm
Forum: C++ Development
Topic: WebSocket Server
Replies: 2
Views: 122

WebSocket Server

Hey. I used to use wxSocketBase to host a local server and (maybe) misused it even as HTTP server. Now I want to add a WebSocket server functionality, but I am not sure if the wxSockets are suited for this case. My client will be javascript from a 'webside', which my C++/wxWidgets program will host ...
by Natulux
Tue Oct 01, 2019 12:09 pm
Forum: Compiler / Linking / IDE Related
Topic: VS2019 and utf8 file encoding
Replies: 3
Views: 191

Re: VS2019 and utf8 file encoding

I have found no setting in VS2019 and people from stackoverflow also didn't know about it. ( https://stackoverflow.com/questions/58163785/vs2019-compiler-misinterprets-utf8-without-bom-file-as-ansi ) So the only solution was to loop through the directory, reqriting the files as UTF-7 and prepend the...
by Natulux
Fri Sep 27, 2019 6:48 am
Forum: Compiler / Linking / IDE Related
Topic: VS2019 and utf8 file encoding
Replies: 3
Views: 191

Re: VS2019 and utf8 file encoding

I haven't tried it, but this sounds promising: https://docs.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=vs-2019 Interesting one. It says: By default, Visual Studio detects a byte-order mark to determine if the source file is in an encoded Uni...
by Natulux
Thu Sep 26, 2019 1:42 pm
Forum: Compiler / Linking / IDE Related
Topic: VS2019 and utf8 file encoding
Replies: 3
Views: 191

VS2019 and utf8 file encoding

Hey. I am migrating to wxWidgets 3.1.2 with VS Community 2019 and suddenly my german umlaut is displayed utf8 encoded. Little dejavu: Same issue as back when I migrated to wxWidgets 3.1.1 with VS 2017 (article: https://forums.wxwidgets.org/viewtopic.php?f=1&t=44580&p=184699#p187575 ) I browsed the o...
by Natulux
Fri Sep 20, 2019 9:13 am
Forum: C++ Development
Topic: wxConfigFile deletes user group entry
Replies: 3
Views: 105

Re: wxConfigFile deletes user group entry

Hey, just to wrap this up: I tested wxFileConfig in several uncritical places: When writing (changing/deleting) with wxFileConfig, user (group) permissions are generally overwritten. At least on my Win10 Prox64 system. I was able to work around this, by creating a copy of the INI in question (wxCopy...
by Natulux
Mon Sep 16, 2019 9:10 am
Forum: C++ Development
Topic: wxConfigFile deletes user group entry
Replies: 3
Views: 105

Re: wxConfigFile deletes user group entry

It unconditionally uses wxTempFile internally which creates a new file and later renames it. Maybe you can fix the permissions afterwards using wxFileName::SetPermissions https://docs.wxwidgets.org/trunk/classwx_file_name.html#ae1b6847990f5b41f5b53fb46a5e5fb79 FWIW, a better location for that file ...
by Natulux
Tue Aug 27, 2019 7:27 am
Forum: C++ Development
Topic: wxConfigFile deletes user group entry
Replies: 3
Views: 105

wxConfigFile deletes user group entry

Hey everyone, I use wxConfigFile to read/write from/to ini files. Now I have a shared ini file, that is placed in "C:\Windows\file.dat" (not my idea to place it there ...) Because "Windows" is a protected enviroment, the file has a usergroup (user "jeder" (everyone)) entry with elevated right for re...
by Natulux
Wed Aug 07, 2019 12:13 pm
Forum: C++ Development
Topic: Unicode Madness
Replies: 24
Views: 744

Re: Unicode Madness

Oh, you know chilkat? You never stop to surprise me. I bought and use their Email component. Saved me so much time. Worth every cent. I have the feeling that chilkat is able to solve everything, if you find yourself able to puzzle the right examples and classes to your usecase. I had some serious h...
by Natulux
Wed Aug 07, 2019 9:08 am
Forum: C++ Development
Topic: Unicode Madness
Replies: 24
Views: 744

Re: Unicode Madness

I just meant: ISO-8859-1 is my local encoding and can be displayed on my machine. To display any UTF-8, I would normally use wxString::FromUTF8() and I would get my local encoding, right? Not exactly. wxString stores Unicode characters internally and they can be displayed inside wxWidgets directly....
by Natulux
Wed Aug 07, 2019 6:37 am
Forum: C++ Development
Topic: Unicode Madness
Replies: 24
Views: 744

Re: Unicode Madness

There is no such thing as "escaped" or "unescaped" UTF8. "ğ" is Unicode 0x011F 0x011F converted into UTF8 encoding is 0xC4 0x9F. There is no ambiguity anywhere. I have those terms from PHP. I guess that flag is just badly named and means: utf8 or unicode code points. However, if I send "ğ" as UTF8 ...
by Natulux
Tue Aug 06, 2019 1:31 pm
Forum: C++ Development
Topic: Unicode Madness
Replies: 24
Views: 744

Re: Unicode Madness

Ahh, sry guys. When it comes to the second page, I often miss that there were new answers. I didn't want to ignore you. Please let me warm up this post again. My last message said, that I can send utf8 as is, which was only right for unicode letters from u+0000 to u+00FF. I tested the turkish letter...
by Natulux
Fri Jul 12, 2019 9:11 am
Forum: C++ Development
Topic: Unicode Madness
Replies: 24
Views: 744

Re: Unicode Madness

What happens if you send using wxHttp and libcurl? IIRC, wxHTTP is not able to send https, so unfortunately this is no option for me. So the only thing missing is the URL encoding? wxString urlHexEncode( const char *in ) { wxString out; out.Alloc( wxStrlen(in) * 2 ); char c; while( (c = *in++) != 0...
by Natulux
Thu Jul 11, 2019 12:10 pm
Forum: C++ Development
Topic: Unicode Madness
Replies: 24
Views: 744

Re: Unicode Madness

What exactly are you doing with the utf8 encoded data and how to you process it on the receiving side? I use the chilkat CkHttp class to send a https POST to PHP REST server. The body of my POST holds data, which is a json string. Example { "username":"Jürgen" } The text data encoding is supposed t...
by Natulux
Thu Jul 11, 2019 8:26 am
Forum: C++ Development
Topic: Unicode Madness
Replies: 24
Views: 744

Re: Unicode Madness

Something different (src: https://www.utf8-zeichentabelle.de/unicode-utf8-table.pl ): From my wxString("Jürgen", wxConvUTF8) == "Jürgen" example: From the UTF8 table: ' ü ' has the unicode codeposition: U+C3BC ' à ' has the unicode codeposition: U+00C3 ' ¼ ' has the unicode codeposition: U+00BC So...