Re: Can I upload Perl program in unicode?



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
.



Relevant Pages

  • Re: case-sensitivity
    ... supports the UTF style of inputing characters. ... I do not doubt that notepad does accept UTF input, ... an US/European keyboard. ... code for current day programming (not to say anything about the future ...
    (comp.lang.scheme)
  • Re: OTish - Thunderbird and UTF coding
    ... fuss about character coding. ... When I reply to a NG post I get a message asking how I want to send - using UTF, ... Most likely because you have some quoted text that has characters in it that are not part of the set you have selected to post with. ...
    (uk.comp.sys.mac)
  • Re: OTish - Thunderbird and UTF coding
    ... fuss about character coding. ... When I reply to a NG post I get a message asking how I want to send - using UTF, ... Most likely because you have some quoted text that has characters in it that are not part of the set you have selected to post with. ...
    (uk.comp.sys.mac)
  • Re: What is UTF-8?
    ... some characters take more that 16 bits in UTF. ... look in memory? ... wondered which UTF they meant - now I see they meant Unicode because it is ...
    (microsoft.public.dotnet.languages.vb)
  • Re: [OT] Breaking lines (Was: Is int main() { /* ... */ } valid?)
    ... With the quoted-printable transfer encoding, is primarily use to encode 8 bits characters through a 7 bits network, especially when most of the text consists of ASCII characters. ... Newsreader implementing MIME are likely to display long lines correctly.... ...
    (comp.std.c)