Skip to content

Commit

Permalink
Convert OS provided UTF-8 for file drops
Browse files Browse the repository at this point in the history
  • Loading branch information
jvuletich committed May 16, 2022
1 parent 606a32d commit f2844dd
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'From Cuis 6.0 [latest update: #5169] on 16 May 2022 at 11:17:31 am'!

!DropFilesEvent methodsFor: 'files' stamp: 'jmv 5/16/2022 11:16:19'!
fileNamesDo: aBlock

1 to: numberOfFiles do: [ :fileNumber | | utf8Bytes |
(self primDropRequestFileName: fileNumber) ifNotNil: [ :primUtf8Bytes |
utf8Bytes _ primUtf8Bytes.
utf8Bytes class format = ByteArray format "True unless image is in 32bit V3 format"
ifTrue: [ ByteArray adoptInstance: utf8Bytes ]
ifFalse: [ utf8Bytes _ ByteArray withAll: utf8Bytes ].
aBlock value: (String fromUtf8: utf8Bytes) ]].! !

0 comments on commit f2844dd

Please sign in to comment.