Skip to content

iconv not complete convert to utf8

When I converted the my text on this site, be converted correctly: http://string-functions.com/encodedecode.aspx I choose source ‘Windows-1252’ and target ‘utf-8’. See it in the screenshot below: https://i.stack.imgur.com/2Pn4E.png But when I convert with the following code, Some lette…

ESP8266 module fails at boot

I have a ESP8266MOD ESP-12-E hooked up to a USB-to-UART module. When I try to communicate with the module I get some intelligible output then an error message and the communication is closed. For ai-thinker-0.9.5.2-115200 and espressif-nonos-2.0.0-SDK (this is not the actual name of the file): For a nodeMCU f…

Unable to unzip large Linux zipped archive in Windows

Server environment: Linux RHEL5 x86_64, Apache, PHP Client environment: Windows 10 64 bit (VirtualBox MacOS host), 4GB Ram, 30GB free space, Browser IE11 (also tested with Edge/Firefox), 7zip The scenario is the following: I upload a zip (there is a file inside the archive that is 2.5GB) via browser to my PHP…

can /proc/self/exe be mmap’ed?

Can a process read /proc/self/exe using mmap? This program fails to mmap the file: Answer You are making 2 mistakes here: Mapped size must be > 0. Zero-size mappings are invalid. You have to specify, if you want to create a shared (MAP_SHARED) or a private (MAP_PRIVATE) mapping. The following should work f…

Mitigating memory leaks by forking

This is a really ugly question. I have a C++ program which does the following in a loop: Waits for a JMS message Calculates some data Sends a JMS message in response My program (let’s call it “Bob”) has a rather severe memory leak. The memory leak is located in a shared library that someone …

Signals in ppoll not handled immediately

I wrote a small ppoll test but I am confused about the signal handling. The man page says: The relationship between poll() and ppoll() is analogous to the relationship between select(2) and pselect(2): like pselect(2), ppoll() allows an application to safely wait until either a file descriptor becomes ready o…

How does perf associate events to functions?

More precisely how does the perf tool associate PMU events to functions i already realized that when the kernel perf subsystem records the event counters it also records the Program Counter (PC) so it can associate the count to a function. However to really get fine grain result, you need to sample the counte…