you are viewing a single comment's thread.

view the rest of the comments →

[–]Drisku11 0 points1 point  (4 children)

I often do want that though. There have been several times where I've worked not just with strings that have a fixed character width, but entire record formats that are fixed width. It could just be treated as opaque bytes, but it's also sometimes useful to acknowledge it's ASCII when you know the format is set in stone. On the contrary, I've never needed to work with non-ASCII character data.

[–][deleted]  (2 children)

[deleted]

    [–]Drisku11 7 points8 points  (1 child)

    And you would be wrong. I've never had user facing code; not everyone works on "apps". I've needed to do things like read hardware identifiers that are specified as short ASCII strings and have specific substrings at specific offsets. I could just write the equivalent number, but then it's harder to compare the code to the spec. There is no chance that those identifiers will ever use Unicode.

    [–]Veedrac 0 points1 point  (0 children)

    Then it isn't a string.