Morton Fox (mortonfox) wrote,
Morton Fox
mortonfox

age++

Pine Creek

I'm 35!

On a day like yesterday, well, let's just say that I'm glad my investment portfolio is very unconventional. While the S&P 500 slid 4.7%, my trading account was up 7.7%. So thanks, Wall Street, for the early birthday present. :)

This evening, I did some work on Unicode and Multibyte support in TwitVim because a user asked for it. That took some experimentation because Vim script handles Unicode in a somewhat inconsistent manner. Some common string functions like strlen(), strpart(), etc, and string[] indexing deal in bytes, not characters, so to get the actual length in characters of a Unicode string, for example, you need a weird hack like strlen(substitute(unicode_str, ".", "x", "g")). That code snippet, which I came across in Vim's help documentation, replaces each character, multibyte or not, in the string with a single ASCII character before calculating the string length the naive way.

I'm still unsure whether my code handles some of Vim's more obscure character encodings correctly, so I hope a user will let me know if it breaks somewhere.

Anyway, I have some things to do and places to go tomorrow so I'd better get some sleep. Later!
Tags: birthday, multibyte, twitvim, unicode
Subscribe

  • Metro Gathering 2019

    The last few years, Metro Gathering was in October and had a Halloween theme. This year though, the geocaching mega event is in September and has a…

  • Metro Gathering 2018

    I was in Northern New Jersey October 18 thru 22 for Metro Gathering, the only geocaching mega event I've been attending annually. I went to fewer…

  • Patuxent Ponds

    16 years ago, I lived in Northern New Jersey and I used to travel very far from home because at the time, geocaches were few and far between. One of…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 43 comments
Previous
← Ctrl ← Alt
Next
Ctrl → Alt →
Previous
← Ctrl ← Alt
Next
Ctrl → Alt →

  • Metro Gathering 2019

    The last few years, Metro Gathering was in October and had a Halloween theme. This year though, the geocaching mega event is in September and has a…

  • Metro Gathering 2018

    I was in Northern New Jersey October 18 thru 22 for Metro Gathering, the only geocaching mega event I've been attending annually. I went to fewer…

  • Patuxent Ponds

    16 years ago, I lived in Northern New Jersey and I used to travel very far from home because at the time, geocaches were few and far between. One of…