(get_weight): Extract string elements as unsigned values.