Re: Doubleclick and @ARGV
[email protected] (Shawn H Corey) Tue, 14 Jan 2025 11:20:39 -0500
| Newsgroups | perl.wxperl.users |
|---|---|
| Message-ID | <[email protected]> |
--------------WLm0ZCh6d2ZGT0fnIWYIFyDF
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
On 2025-01-14 11:16, Johan Vromans wrote:
> On Mon, 13 Jan 2025 17:42:11 -0500, Shawn H Corey wrote:
>
>> I think you have to decode the file names.
>>
>> use Encode qw(decode);
>> my $file = decode($ARGV[0]);
> That's what I thought, but decoding is quite pointless if you get question
> marks instead of UNICODE characters to start with.
>
The question mark comes from the terminal. It replaces unprintable
characters with it. Do you have `hexdump` (aka `hd`)? Print the file
names and pipe them to `hd`. Then you can see the hexadecimal codes for
the characters.
--
𝑆𝒉𝒂𝒘𝒏 𝐻 𝐶𝒐𝒓𝒆𝒚 🇨🇦
--------------WLm0ZCh6d2ZGT0fnIWYIFyDF
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 2025-01-14 11:16, Johan Vromans
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:[email protected]">
<pre class="moz-quote-pre" wrap="">On Mon, 13 Jan 2025 17:42:11 -0500, Shawn H Corey wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">I think you have to decode the file names.
use Encode qw(decode);
my $file = decode($ARGV[0]);
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
That's what I thought, but decoding is quite pointless if you get question
marks instead of UNICODE characters to start with.
</pre>
</blockquote>
The question mark comes from the terminal. It replaces unprintable
characters with it. Do you have `hexdump` (aka `hd`)? Print the file
names and pipe them to `hd`. Then you can see the hexadecimal codes
for the characters.<br>
<br>
<pre class="moz-signature" cols="72">--
𝑆𝒉𝒂𝒘𝒏 𝐻 𝐶𝒐𝒓𝒆𝒚 🇨🇦</pre>
</body>
</html>
--------------WLm0ZCh6d2ZGT0fnIWYIFyDF--