Posts Tagged ‘dos’

Vi(m) tip #6: save a file with digraphs as utf-8 plain text

Tuesday, December 22nd, 2009

I took all of my algorithms notes this semester in vim using digraphs for math symbols. Today I wanted to cat all the files and print the results. However, I had overlooked that when vim inserts a digraph it’s subtly displaying a UTF-8 character in your terminal but not necessarily saving your file with this encoding. To be sure issue the following commands from command mode in vim:


:set enc=utf-8
:e
:wq

When I want to view or print my notes, I insert them into a &ltpre&gt tag in an html document, using my converter script to take care of escaping wakkas and being sure to declare utf-8 charset in the content-type meta attribute:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv='Content-type' content='text/html;charset=UTF-8' >
  </head>
  <body>
    <pre>
        Paste escaped UTF-8 plain text here
    </pre>
  </body>
</html>

My UTF-8 notes as a HTML page viewable in browser.

source

Astrowind DOS game

Tuesday, October 13th, 2009

astrowind

Astrowind was a final project for Computer Organization class. It is a
Galaxian/Galaga type vertical shooter game with the catch that
there is wind in space!

Bullets affected by the wind and also wrap around the screen edges.
The player has to kill enemies while avoiding them and her own
bulllets.

Note: This is a 16-bit game, which means (for now?)
you can’t play it on Windows Vista or Windows 7. If you are using a
Mac/Linux/Unix machine. Get DosBox or the equivalent emulator.

Download astrowind executable and source