Win32 I/O character encoding part 2: chcp 65001

In a previous post, I summarized the character encodings used by Windows console mode programs. This is a short post about a not-very-good mitigation technique for some of the resulting problems. In a future post, I’ll go over some better solutions. Sometimes on an internet forum, someone will complain about a third-party Windows console program…… Continue reading Win32 I/O character encoding part 2: chcp 65001

How long does it take to fall through a ball of ice?

Planet FrictionlessIceball has a straight, narrow tunnel connecting two points on its surface. How long does it take to slide through the tunnel? Simplifying assumptions As with most story problems, we have to make some simplifying assumptions. But I think they’re fairly reasonable. We assume the faller starts out motionless, at one end of the…… Continue reading How long does it take to fall through a ball of ice?

How is a JPEG image’s color type determined?

In order to decode and display a JPEG image, you have to know what “color type” (or “color model”) it uses. There are several possibilities that your software probably ought to handle: Grayscale YCbCr (transformed from RGB) RGB YCCK (transformed from CMYK) CMYK Unfortunately, if you look at all the bits and bytes that make…… Continue reading How is a JPEG image’s color type determined?