Overview
| Artifact ID: | c8e74e753c67a25db832bafd8a1902b604b25cad |
|---|---|
| Ticket: | 768852ffffffffffffffffffffffffffffffffff
binary format a* $utf8_string - needs u/U |
| User & Date: | dkf on 2003-07-10 22:31:28 |
Changes
- assignee changed to: "hobbs"
- icomment:
Logged In: YES user_id=79902 Behaviour in this case is undocumented (!) but since the primary purpose of the [binary] command is interaction with the system, I'm tempted to say that we will handle the a and A formats using [encoding system]. The alternative is to drop the high bytes (which is what happens now) but that's not nice at all. So, proposed change: [binary format a* $str] to use [encoding system] when converting to a byte-stream (which is inserted in the resulting bytearray.) Hence we also use [encoding system] when going the other way too. Net result is that the attached script will not work. However the following will: binary scan [binary format a* $foo] a* bar and the strings will be equal IF ALL THE CHARACTERS ARE REPRESENTABLE IN THE SYSTEM ENCODING (which will be fine most of the time.) Any comments Jeff? If you approve, assign it back to me and I'll develop a fix.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"