The hyphen may not be 'the' hyphen character. Pretty sure there are two.
So: what encoding does the stringvalue get you?
textfield.mask = "9999-999" work using a literal?
Yes, the mask works if I type it in as a property of the text field. I have not changed the text encoding from the default and I'm typing this into a field which is being saved in a "text" field and then storing that value to the mask property.
I see you're point, but I don't think that's the issue.