[PHP] Unable to detect character encoding – how to detect it properly?

Last time I had a very strange case for simple XML file processing. the file was downloaded from the external server, there was no response header about content-encoding but the browser (Chrome) could display it correctly, the file was processed by file_get_contents function. The issue was that preg_match couldn’t find anything and str_replace was not…… Read more [PHP] Unable to detect character encoding – how to detect it properly?

How to exit from: vi(m), telnet, bash, …

Exit VI(M) Press ESC to enter normal mode, Optional: Type :w (colon + w) to save changes, Type :q (colon + q) to exit vi(m). If you don’t want to save changes, add an exclamation mark – :q! More about vi(m) modes you can find e.g. here: https://en.wikibooks.org/wiki/Learning_the_vi_Editor/Vim/Modes You are not alone: https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/ Exit Telnet Telnet is giving… Read more How to exit from: vi(m), telnet, bash, …