After nearly two months of downtime, RedYawning is back online at a new home thanks to a new hosting home at Dan’s apartment. It joins in his excessively powerful set of servers and connectivity already wired through his Civic Center pad. For me, I’m in the states this week until Sunday. Now that my blog is reenabled, expect to see more posts from me again (or not).
Losing Your Wallet
Losing your wallet is always a pain, no matter where it happens. I lost mine about three weeks ago, I’m pretty sure it was pick pocketed on my way to work. Luckily there was nothing really important in it, just some cards to bank accounts and like keycards to buildings. I keep two wallets, one with all my American stuff and another with all my Chinese stuff, so there was no cross over issues.
Taking care of getting the cards back was a mixed bag of fun and adventure. I have two banks here, China Merchants Bank (a checking account and a credit card) and Bank of China (just a checking account). The CMB Credit Card came back to me within a week, but the two ATM cards are a total mess to get back and BoC is the worst. I had to go back to the branch where I opened the account, fill out some forms including presenting my passbook and passport.
After all that I figured they’d just give me a new card (since the ATM cards in China don’t have your name on them, they’re just cards linked to your account). Nope, I actually have to go back to the same branch office two weeks later with a claim slip and pick the card up.
Quite a Month
RedYawning suddenly came back online. I can’t really figure out why but I’m not complaining.
It’s halfway thru August and the weather keeps getting hotter in Shanghai. It looks like it’ll abate soon but the heat index today was 105F and yesterday was the hottest day of the year (in terms of the raw heat) at 38.2C. Yikes. In the spirit of summer I also decided a while back to try to get more active so I’ve been doing yoga twice a week, playing squash once a week and hitting the gym once or twice a week. It’s acutally worked out quite well and I’ve been at it for a few months now. There’s a small but fantastic yoga studio named Y+ in the French Concession (Fuxing Xilu at Huashan Lu) with good teachers, good students and an awesome cafe in the same building. I’ve been spending a lot of time at Ginger, given the free wifi, good sandwiches plus a decent staff (a rare find).
Also in the month of August I’ve managed to lose my mobile phone, a RAZR V3 by leaving it in a taxi and lose my wallet this weekend by who-knows-what method. I just can’t seem to find it. Thankfully no important documents where in there, just some cash and a bunch of local bank cards/etc. Outside of that, my family and my high school friends are coming by in September I’ll have lot of visitors soon enough.
Chris Patten in Shanghai
On Tuesday night me and two coworkers (a Brit/South African and a Hong Kongese) went to the renovated Glamour Bar to see Chris Patten give a talk. The new Glamour Bar was quite nice, it moved down below M on the Bund (used to be above it) and has a nice layout for a happy hour type of gathering. Lord Patten came on to the stage around 6:15 and started with a few words about Shanghai, about the M restaurants as well as some other quips that I don’t really remember (but they had me and the crowd laughing).
The name of the event was “The Wisdom and Wit of Chris Patten” and he then started in to the wisdom bit with five points that I assumed came from his most recent book. The basic jist of what he said was how America had backed away from the rules based global leadership that it had exhibited in the last 50 years of the 20th century and how the rise of India and China dictated and necessitated a return to a lot of the globalist policies that America and Europe had once embraced. One of the other main points he made was that Europe needed to stop its xenophobic move regarding Eastern Europe as well as EU expansion.
Unfortunately I can’t really recall everything that he said but I came away with a few impressions. He’s very pro-business and lassize-faire (how can you not be when you had been the last Governor of Hong Kong?). The manner in which he spoke had that aura of an 1970s glamourous British diplomat: every word measured and timed; what was spoken and moreso what was unspoken gave the true meaning of his speech. He was quite captivating to listen to and his speech exuded education and experience far beyond what I’ve seen from American politicians.
During the question & answer period there were a lot of good and probing questions asked including one by some idiot American that rambled in an English that was worse than a lady from Zimbabwe who’d asked another question. However, the last question that was asked was what he sees in Hong Kong’s future. He answered that it was inevitable that democracy would soon arrive and it was the only place in the world where a free nation (e.g. the rule of law existed, open business practices, an uncorrupted police force, etc) exists without a democratic process. The China Daily has an article about his visit to Shanghai and briefly mentions his talk at Glamour Bar.
After the talk, I got a copy of a friend’s book signed and then went to M on the Bund for dinner. M has now firmly placed itself as my favorite restaurant in Shanghai. I’ve been twice and it’s been consistently great. About half way through our meal Lord Patten ended up sitting at the table beside ours, so we got to watch the spectacle of his entourage and some very obvious sycophants. It was quite amusing to, since he started alone and sat as his table reading his Economist and after his quiet time was up about 12 people decended on his table to join him for dinner.
Hip-Hop Lives in Shanghai with DJ Jazzy Jeff
Generally there is a sad lack of hip-hop in Shanghai. Staples like Guandi or Windows are always there but it’s often the same music night after night (esp at Windows). I was surprised — nay, shocked — to see that DJ Jazzy Jeff was going to be in Shanghai at Bonbon last night. I made it to Bonbon about half an hour before he came on. The crowd was pretty interesting, probably half of them were foreigners and the other half locals.
The set was fantastic: it started with some songs I’d never heard before that had more of a D&B beat and then moved on to more typical club songs that were mixed incredibly well. The crowd was really in to it and everybody’s head was bobbing to the tracks. Rumor has it that Naughty by Nature is also going to be in Shanghai in the next few days or weeks, so if this pace can be kept up, there’s hope yet for hip-hop here.
Globalization of Windows Live Mail
Back in the day I worked on among other things the globalization support for Kahuna/Windows Live Mail. The current Hotmail product had limited support for globalized email and so we took this opportunity to enhance how our product would work in terms of sending and receiving email in various languages and markets. I wanted to share some of the scenarios and rules that we use under the hood in order to make Windows Live Mail work well in the global email arena.
On the sending side, the easiest solution would have been to send everything as UTF8 and call it a day. But that’s cheating. For starters, there are a lot of mail clients that exist in many countries that don’t support UTF8 encoding. Further, many national standards bodies request that mails sent in certain languages be sent in certain national character (GB18030 is a good example) sets and transfer encodings. Here are some of the rules we use when we generate mail that get sent to the internet.
- Detect the user’s UI settings and country settings first
- Auto detect against the entire From, Subject, and Body of the message
- If one language is detected, then the native charset is the default charset for the outbound email. Thus we send email in native charset to be compatible with other email services.
- If multiple languages related to multiple charsets are detected (e.g. English, French and Japanese), then the outbound mail needs to be encoded with UTF8
- If the From, Subject or Body are too short, detection may fail guess incorrectly so it’s possible the wrong outbound encoding may be used
On the receiving side, mail clients have absolutely no idea what the kind of mail that it receives are: what the character encoding is, what the transfer encoding is, even if it’s in proper RFC format. Thus, to properly display globalized data, we have a lot of rules about to make our best effort at decoding a message.
- If the message comes with complete MIME charset info convert this inbound email from the charset to UTF8 for display
- While reading a message, if the header is RFC2047 encoded but with no body charset info, we apply the header charset to the body without running autodetection. The case the charsets of the head and body are different is not common.
- While reading a message, if header is not RFC2047 encoded but body is correctly tagged, we can apply the body charset to the header without running autodetection
- While reading a message, if the body contains 8 bit characters ignore any US-ASCII tagging
- If the header is not RFC2047 encoded correctly, we apply the user default charset based on the user’s language and country since in the detecting the header may be too expensive. Remember, we’re talking about millions of transactions per second here.
- If there is no MIME charset tag or unknown MIME charset or charset is US-ASCII and the message contains 8-bit characters, then the encoding selector should be shown up to allow user to select new encoding in read message page and preview pane page. After a user selects his encoding, then Windows Live Mail will re-load the message based on the user’s selection and convert it to UTF8 for display.
- In all cases of ambiguity, show the character selection drop down
There’s a lot of complexity here but we’re quite happy with the way it works. I can read and write emails in multiple languages, which is a huge improvment over Hotmail.
Where I’ve Been
My blog has been devoid of posts for some time primarly since RedYawning was down for nearly a month. I was in the states two weeks ago and got around to fixing it. Turns out that during a reboot the RAID mirror became inconsistent thus it refused to boot, waiting for me to say “okay” to have it rebuild the array. Lame.
Things are going swimmingly in this half the world. I was in San Francisco for two weeks in the end of June and now back in Shanghai. A typhoon missed the city last night which means it’s been blue skys for a total of a day (a personal best). Work continues as usual but a bit busier now with some of the stuff we did in the states now moving out here. Outside of that, nothing much else going out.
Travel plans for the rest of the year are starting to firm up and it looks like I’ll be heading to India in October which means I have to start applying for a visa. Hopefully I can apply for an OCI but it’s unclear if it’s possible to apply in China and the consulate has yet to return my calls.
Finding an Urban Oasis: Fuxing Xi lu
In the hustle and bustle of Shanghai it’s often hard to find any peace and quiet on the street let alone an avenue that’s enjoyable to take a walk on. I stumbled on to an incredible urban oasis on Sunday. I tried out a new yoga studio at Fuxiing Xi Lu and Huashan Lu. The studio is in a beautiful 1930s building that houses a few small boutiques, a cafe and the yoga studio. After the class, I walked along Fuxing Xi Lu until it became Fuxing Zhong Lu.
The street is lined with trees on both sides that arch together to nearly form a canopy across the center and there are all kinds of boutique shops like Madam Mao’s Dowry and Ginger, a cafe. Interestingly enough, some of the stores had full gardens behind them which was wholly shocking. I’d highly recomend starting at Huashan Lu and walking down for half and hour or so until the roar of the traffic reminds you that you’re in Shanghai.
Updated Home and Office Contact Info
Since I’ve changed offices and moved apartments, here’s my updated contact information:
我的住址
中国上海市徐汇区虹桥路168号4幢1603室.
邮政编码: 200030
Home
Room 1603, Block 4, No. 168 Hongqiao Road
Xuhui District, Shanghai
200030, P.R. China
办公室
中国上海市徐汇区虹桥路3号港汇中心2座9层
微软(中国)有限公司上海分公司
邮政编码: 200030
Office
Microsoft (China) Co. Ltd., Shanghai Branch Office
9th Floor, Grand Gateway Block 2, No.3 Hongqiao Road
Xuhui District, Shanghai
200030, P.R. China
公寓电话号码 / Home Phone
+86 21 64393809
移动电话数字 / Mobile Phone
+86 136 81989831
办公室电话 / Office Phone
+86 21 61518051
Pictures from Bangkok
I have my Bangkok pictures online. Here are the links to the full collections and a few representative shots as well.
Day 1: Night time arrival on Khao San Road

the chaos of vendors, tourists and locals
Day 2: Golden Buddha, Gold Mount and various wats

the Golden Buddha (see the picture on the right for size contrast)

Gold Mount, first the bells on the walk up and view from the roof

yours truly on top of Gold Mount and the canal near by
Day 3: The Grand Palace (Wat Phra Kaew)
,%20Bangkok,%20Thailand/2006-06-04%20The%20Grand%20Palace%20(Wat%20Phra%20Kaew),%20Bangkok,%20Thailand%20064.jpg?size=fixed)
beautiful skies and beautiful artwork and buildings
Lastly, while we were there the celebration of the King’s Jubilee was about a week away so the colors and celebration were in full swing. People everywhere were wearing yellow shirts and signs and pictures of the King were plastered through the city.
people in yellow shirts, portraits of the King, and the party booths in the Royal park

,%20Bangkok,%20Thailand/2006-06-04%20The%20Grand%20Palace%20(Wat%20Phra%20Kaew),%20Bangkok,%20Thailand%20015.jpg?size=fixed)
,%20Bangkok,%20Thailand/2006-06-04%20The%20Grand%20Palace%20(Wat%20Phra%20Kaew),%20Bangkok,%20Thailand%20034.jpg?size=fixed)