The Absolute Minimum Every Software Developer Must Know About Unicode and Character Sets

Posted on May 11, 2014

Unicode was a brave effort to create a single character set that included every reasonable writing system on the planet and some make-believe ones like Klingon, too. Some people are under the misconception that Unicode is simply a 16-bit code where each character takes 16 bits and therefore there are 65,536 possible characters. This is not, actually, correct. It is the single most common myth about Unicode, so if you thought that, don’t feel bad.

In fact, Unicode has a different way of thinking about characters, and you have to understand the Unicode way of thinking of things or nothing will make sense.

In Unicode, a letter maps to something called a code point which is still just a theoretical concept. How that code point is represented in memory or on disk is a whole nuther story.

For more information, see http://www.joelonsoftware.com/articles/Unicode.html

CRF Guide (Constant Rate Factor in x264)

Posted on May 7, 2014

CRF stands for Constant Rate Factor, x264’s best single-pass encoding method.

The Constant Rate Factor (CRF) is the default quality setting for the x264 encoder. You can set the values between 0 and 51, where lower values would result in better quality (at the expense of higher file sizes). Sane values are between 18 and 28. The default for x264 is 23, so you can use this as a starting point.

For more information, See http://slhck.info/articles/crf

MFC support for MBCS deprecated in Visual Studio 2013

Posted on Nov 18, 2013

It is time to move onto Unicode. The multi-byte character set (MBCS) in MFC will not be supported in the future versions of Visual Studio. You can still compile the MBCS projects with VS2013, but you need to install the MBCS libraries via a separate download, which is available here. You will see a deprecation warning, when an application is built using MBCS, though. This warning can be suppressed by adding the NO_WARN_MBCS_MFC_DEPRECATION preprocessor definition.

For more information, see http://blogs.msdn.com/b/vcblog/archive/2013/07/08/mfc-support-for-mbcs-deprecated-in-visual-studio-2013.aspx.

Installing Cygwin sshd

Posted on Sep 24, 2013

From http://pic.dhe.ibm.com/infocenter/tivihelp/v10r1/index.jsp?topic=%2Fcom.ibm.taddm.doc_7.1.2%2FAdminGuide%2Ft_cmdb_installssh2.html

To install Cygwin sshd, complete the following steps:

  1. Download the Cygwin program from the following Web site: http://cygwin.com/
  2. Run the setup program.
  3. Select the packages to install. In addition to accepting the default packages, select the following packages:
    • From the admin category, select cygrunsrv (version 1.17–1 or later).
    • From the net category, select opensshd (version 4.6p 1–1 or later).
  4. When the installation process completes, start the cygwin bash shell.
  5. From your system information, use the cygwin mkpasswd utility to create an initial /etc/passwd. You can also use the mkgroup utility to create an initial /etc/ group. See the Cygwin User’s Guide for more details.

    For example, the following command sets up the password file, passwd, from the local accounts on your system:

    mkpasswd -1 > /etc/passwd
  6. Run the ssh-host-config program setup.
  7. Configure SSH. Answer Yes to all questions.
  8. Start the SSH server by running the following command:
    net start sshd
  9. Open Windows Firewall and allow inbound access to the following file.
    c:\cygwin\usr\sbin\sshd.exe

Thunderbird failed to send and receive emails after the profile folder was moved

Posted on Sep 24, 2013

Thunderbird could not sending and receiving emails although it kept trying, after my old profile folder was moved to a new location. Error console showed the following message.

Your certificate contains the same serial number as another certificate
issued by the certificate authority. Please get a new certificate containing
a unique serial number. (Error code: sec_error_reused_issuer_and_serial)

For more information, see https://support.mozilla.org/en-US/kb/Certificate%20contains%20the%20same%20serial%20number%20as%20another%20certificate.

Continue…