I have a string like:
a = "@\n\u001E\rANSI 636000410225ZM02660027DLDCA\nDCB\nDCD\nDBA04052024\nDCSKILLER01-21-2014\nZMB01\n\r"
I'm following this SO link for fix, but no matter what I try, the \u001E
doesn't get resolved to proper string.
What am I doing wrong?
Sample Output
=> a.unpack("U*").map{|c|c.chr}.join
=> "@\n\x1E\rANSI 636000410225ZM02660027DLDCA\nDCB\nDCD\nDBA04052024\nDCSKILLER01-21-2014\nZMB01\n\r"
Same output for: a.encode('ASCII')
Any suggestions?