Re: Can I upload Perl program in unicode?
- From: Bill H <bill@xxxxxxxxx>
- Date: Mon, 28 Jul 2008 17:24:52 -0700 (PDT)
On Jul 28, 5:54 pm, "Peter J. Holzer" <hjp-usen...@xxxxxx> wrote:
On 2008-07-28 20:21, John <john1...@xxxxxxxxx> wrote:
Imagine that I have the following statement in a Perl program.
my $word = '??';
These are two question marks. I suppose that should have been something
else. If you want to write non-ASCII characters in your postings, please
use a newsreader which is able to do so.
If I save the Perl program as 'UTF8' the characters remain.
If I save it in ASCII, the line appears as my $word = '????‘?';
Now, the problem is although I can save it as UTF8 the Perl program needs to
be in ASCII to be run
Why? The perl interpreter is perfectly fine with scripts in UTF-8.
How do I get around this problem?
I could tell you, but then I'd have to kill you.
No, seriously, you seem to be lacking some basics about perl character
strings, so I'll refer you to Juerd's rather good Unicode tutorial:http://juerd.nl/site.plp/perluniadvice
hp
I think - and I could be wrong here, John is writing his code using
something like Notepad that warns you about saving in utf or not. If
you don't save in utf the characters go away. It may be that he saves
in utf and then when uploading it is messed up by his ftp program.
Then again I could be completly wrong here.
Bill H
.
- Follow-Ups:
- Re: Can I upload Perl program in unicode?
- From: Jürgen Exner
- Re: Can I upload Perl program in unicode?
- References:
- Can I upload Perl program in unicode?
- From: John
- Re: Can I upload Perl program in unicode?
- From: Peter J. Holzer
- Can I upload Perl program in unicode?
- Prev by Date: Re: Parallel search in Perl and other languages
- Next by Date: Append newline to files
- Previous by thread: Re: Can I upload Perl program in unicode?
- Next by thread: Re: Can I upload Perl program in unicode?
- Index(es):
Relevant Pages
|