Nп/п : 45 из 100
 От   : Michael Soyka                       2:5075/128        08 сен 23 20:40:41
 К    : Rolf Ade                                              08 сен 23 03:44:03
 Тема : Re: Problem with filenames that include emoji characters
----------------------------------------------------------------------------------
                                                                                 
@MSGID: 1@dont-email.me> 2fcb0049
@REPLY: <87y1hgb8ql.fsf@pointsman.de> 6e769d79
@REPLYADDR Michael Soyka <mssr953@gmail.com>
@REPLYTO 2:5075/128 Michael Soyka
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID: 1@dont-email.me>
@RFC-References:
<53eaef44-31be-4cd5-98a4-b535c4b1b1f6n@googlegroups.com> <87jzt3c5i4.fsf@pointsman.de> 1@dont-email.me>
<8734zpcygj.fsf@pointsman.de> 1@dont-email.me> <87y1hgb8ql.fsf@pointsman.de>
@TZUTC: -0400
@PID: Mozilla/5.0 (Windows NT 10.0; Win64; x64;
rv:102.0) Gecko/20100101 Thunderbird/102.15.0
@TID: FIDOGATE-5.12-ge4e8b94
On 09/08/2023 6:28 PM, Rolf Ade wrote:

> Michael Soyka writes:
>> On 09/07/2023 8:15 PM, Rolf Ade wrote:
>>> The one known scenario which shows what you describe (you can`t open
>>> a filename you got from glob) is: the file names are written in
>>> another encoding then what the system use for its filenames. Though,
>>> in what you presented as results of your own investigations I cannot
>>> see indication that this is the case here.
>>>
>>> But perhaps it`s in fact a strangeness of the used windows APIs (or
>>> how they are used). At least you are right in saying this is strange
>>> and need an explanation. If it`s not the thing from above.
>>
>> I`ve since copied the files from the same thumb drive onto my linux
>> system and retried the "glob" and "open" commands using 8.6.10- it all
>> works.  My Windows version is 8.6.12, a later version, so it appears
>> that my problems are peculiar to Windows.

> For the record: I also saw the emojis as character glyph, they are just
> ordinary unicode code points in utf-8 encodings; your system should be
> able to handle this and for sure Tcl should be able to handle this.

> Should be easy for listening Windows user to test. The file name in
> question is:

> NEXT SAT. 2_15_ FADED LOVERS TOUR in PROVIDENCE! ???.eml

> Use the file explorer to create a file with that name. Then use Tcl
> 8.6.12- and look what glob returns for the directory with the file in
> it. Then try to open the file name returned from glob and try file
> exists.

> On linux this all works well. I used emacs to create a file with the
> name from above in an otherwise empty directory. Then, in an interactiv
> tclsh session:

> glob *
> {NEXT SAT. 2_15_ FADED LOVERS TOUR in PROVIDENCE! ???.eml}
> set filename [lindex [glob *] 0]
> NEXT SAT. 2_15_ FADED LOVERS TOUR in PROVIDENCE! ???.eml
> set fd [open $filename]
> file3
> close $fd
> file exists $filename
> 1

> Mike, can you reproduce the issue with this recipt?

Assuming you meant running this in my Windows box, the answer is no- it 
still fails in exactly the same way in a new, empty directory:

% set filename [lindex [glob -type f *] 0]
NEXT SAT. 2_15_ FADED LOVERS TOUR in PROVIDENCE! ???.eml
% open $filename r
couldn`t open "NEXT SAT. 2_15_ FADED LOVERS TOUR in PROVIDENCE! 
???.eml": filename is invalid on this platform

I haven`t included the output from DisplayCharCodes but I promise it is 
the same as shown way-back above.

Aside for the benefit of other readers.
Entering the emoji characters in Windows Explorer using the keyboard did 
not work (I tried several methods).  I had to create the characters in 
Wordpad and paste them into Windows Explorer while renaming the file.


> rolf

 --- Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
 * Origin: self (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх