Amend previous commit using api_ functions to avoid encoding issue - refs BT#7164