Re: Can I upload Perl program in unicode?
- From: "John" <john1949@xxxxxxxxx>
- Date: Wed, 30 Jul 2008 07:37:38 +0100
"Bill H" <bill@xxxxxxxxx> wrote in message
news:fd3681e1-d79a-47bb-862d-7edd735feef0@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jul 29, 5:54 pm, nntpman68 <news1...@xxxxxxx> wrote:
Just out of curiosity:
What was now the root cause?
bye
N
John wrote:
"szr" <sz...@xxxxxxxxxxxxxxx> wrote in message
news:g6nfae0241m@xxxxxxxxxxxxxxxxxxxx
Ben Bullock wrote:
On Tue, 29 Jul 2008 09:57:57 +0200, Christian Winter wrote:
John schrieb:A lot of people here use Perl on Windows. One of my main uses for Perl
If a Perl script can be encoded in UTF8, the problem must lie with
the upload. I use WS_FTP Pro on my Windows (sorry) machine
is manipulating Microsoft Word/Excel documents via Win32::OLE.
Did you know you can use Explorer as an ftp client on Windows? It'sand vsftpd on my
linux server. I need to look at the setup on both.
fairly handy.
Another little trick I've used before in such situations is, afterAlso have a look at line endings, windows-style line endsThe only problem with these on Unix systems is "bad interpreter"
(CRLF) generally don't mix well with Perl on *nix systems
messages if there is a ^M at the end of the #! line. But these
messages come from the shell, not Perl itself. Perl is able to cope
with any kind of line endings on Unix, so you can run your scripts
as "perl myscript" it will be OK.
uploading, go to your Linux shell and open the script in 'pico', then
save
the file. When pico saves the file, it will have converted any \CR\LF
sequences to just LF. I am not sure who it handles UTF8, however. And
I'm
sure there are other tools for converting as well.
--
szr
Good news. It is all working fine now. I tested it with French, German,
Persian, Chinese and Greek.
I had some problems with DBI and MySQL with Perl and UTF8 but I managed
to
get that to work too.
Many thanks for all the input.
Regards
John- Hide quoted text -
- Show quoted text -
Was wondering that myself
Bill H
Hi
Here's the solution.
On my Windows machine I use ScITE as my editor for Perl. I set the ENCODING
as UTF8 and I can see all the correct characters - whether German , Chinese,
etc. However I save with ENCODING set to 8-bit. I upload with WS_FTP PRO.
WS_FTP is set to auto mode so that any .PL: is transferred as ASCII. On the
linux server, I use vsftpd. In the conf file I set both ascii_upload_enable
and ascii_download_enable to YES. The unicode characters are displayed
correctly.
There is probably a more elegant solutuion.
Hope that helps.
John
.
- References:
- Can I upload Perl program in unicode?
- From: John
- Re: Can I upload Perl program in unicode?
- From: Peter J. Holzer
- Re: Can I upload Perl program in unicode?
- From: Bill H
- Re: Can I upload Perl program in unicode?
- From: Jürgen Exner
- Re: Can I upload Perl program in unicode?
- From: John
- Re: Can I upload Perl program in unicode?
- From: Christian Winter
- Re: Can I upload Perl program in unicode?
- From: Ben Bullock
- Re: Can I upload Perl program in unicode?
- From: nntpman68
- Re: Can I upload Perl program in unicode?
- From: Bill H
- Can I upload Perl program in unicode?
- Prev by Date: Re: behavior of m// operator
- Next by Date: parse postfix stream
- Previous by thread: Re: Can I upload Perl program in unicode?
- Next by thread: Append newline to files
- Index(es):
Relevant Pages
|