Macrons now supported in member profiles

Written by Stephen Adams, our resident code monkey who has worked with the team above during Māori Language Week to get our first part of Trade Me’s code base supporting the macron.

Tēnā koutou,

Following on from the te reo update to our iOS app, a small band of developers, testers and product owners spent all of Māori Language Week exploring the first steps around how we can support macrons on-site. You can find out more about why this is technically so challenging, on our previous blog post.

Trade Me has been around since 1999 and our initial database design did not have support for unicode characters like the macron. Without unicode character storage we have no native support for members to write in their language of choice like Māori, Hindi, Chinese and others.

Supporting macrons on member profiles

At the start of the week we identified a proof of concept change we could make that would be of relatively low risk. It required updating three columns in one of our database tables from varchar (standard ASCII characters) to nvarchar (unicode supported characters), and also a few of our stored procedures (functions in our database that our code calls to get information).

That work was to update the member profile page to support macrons and other characters that are used in many Māori words. The work went well and it’s now live, so feel free to give it a go! If you’re using Windows I recommend installing the Māori keyboard to make your life easier.

What’s next?

The next piece of work we started on was adding the ability for members to include macrons when writing their name. This turned out to be a much, much larger piece of work. A member's name is used across the site and adding unicode support had wide ranging impacts that we wanted to assess. We had to update hundreds of store procedures to support it and a large part of our time was spent ensuring our email messages displayed macrons correctly.

Whilst we didn’t manage to finish it this week, we’ve covered off a large part of this work and think it’s feasible to be able to make this change in the future.

Further along we'd like to be able to have Trade Me support unicode characters for any data we store and we are pushing for that in all our new changes to the site.

Watch this space.

Mā te wā,

Stephen Adams

Developer

Update: we now support macrons (and other accents) in first and last name. Read more.