forked from Cuis-Smalltalk/Cuis-Smalltalk-Dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert OS provided UTF-8 for file drops
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
CoreUpdates/5170-FileDrop-convertUtf8FromOS-JuanVuletich-2022May16-11h16m-jmv.001.cs.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) ]].! ! | ||
|