Manuscript (Case [Issue]21712) Tools - String conversions into ByteArray

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Manuscript (Case [Issue]21712) Tools - String conversions into ByteArray

Pharo Issue Tracker
Manuscript Notification
avatar
bstjean opened Case 21712: String conversions into ByteArray and assigned it to Everyone:
Bug in Project:  Tools: 1. Pharo Image  •  You are subscribed to this case
If you inspect the following ByteArray, you should get the bytes 'Les élèves français' in the "Bytes" tab of the inspector for the utf8 encoding.

#[76 101 115 32 195 169 108 195 168 118 101 115 32 102 114 97 110 195 167 97 105 115]

Now, if I take that very same string, 'Les élèves français' , and convert it to a ByteArray from a workspace, you get :
'Les élèves français' asByteArray inspect.

#[76 101 115 32 233 108 232 118 101 115 32 102 114 97 110 231 97 105 115]

The 2 ByteArray don't match! And in the second case, looking at the same Bytes tab in the inspector shows 'ZnInvalidUTF8: Illegal continuation byte for utf-8 encoding' error for the utf-8 encoding

By the way, this problem exists on Pharo 5.1, 6.1 and 7.1 (on Windows 10)

Can anyone confirm/infirm on another platform to see if this is Windows-specific?
Priority Priority: 5 – Fix If Time Status Status: Work Needed
Assigned To Assigned to: Everyone Milestone Milestone: Later

Go to Case
No longer need updates? Unsubscribe from this case.

Don't want Manuscript notifications anymore? Update your preferences.

Manuscript

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
https://lists.gforge.inria.fr/mailman/listinfo/pharo-bugtracker