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

  • Virtual Conventions

    The COVID-19 pandemic has forced a number of furry conventions to cancel this year due to state and local emergency regulations and also out of…

  • FA United 2019

    Last weekend was FA United 2019 in Northern Virginia. That was my fourth and last furry convention for the year. It'll be hard to cut one convention…

  • 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…

  • 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 →

  • Virtual Conventions

    The COVID-19 pandemic has forced a number of furry conventions to cancel this year due to state and local emergency regulations and also out of…

  • FA United 2019

    Last weekend was FA United 2019 in Northern Virginia. That was my fourth and last furry convention for the year. It'll be hard to cut one convention…

  • 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…