age++

Sep. 18th, 2008 03:40 am
mortonfox: (fox sit)
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!

Profile

mortonfox: (Default)
Morton Fox

May 2020

S M T W T F S
     12
3 456789
10111213141516
17181920212223
24252627282930
31      

Syndicate

RSS Atom

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags