RE: encoding(UTF16-LE) on Windows

2011-01-28 Thread Jan Dubois
On Fri, 21 Jan 2011, Erland Sommarskog wrote: > "Jan Dubois" (j...@activestate.com) writes: > > You need to stack the I/O layers in the right order. The :encoding() > > layer needs to come last (be at the bottom of the stack), *after* the > > :crlf layer adds the ad

RE: encoding(UTF16-LE) on Windows

2011-01-21 Thread Jan Dubois
I wrote: > I saw some discussion today that the :raw pseudo-layer in the open() > call will also remove the buffering layer (it doesn’t do that when you > use it in a binmode() call). I’ll try to remember to send a followup > once I actually understand what is going on. That seems indeed to be the

RE: encoding(UTF16-LE) on Windows

2011-01-21 Thread Jan Dubois
:40 PM To: perl-unicode@perl.org Subject: Re: encoding(UTF16-LE) on Windows Jan Dubois wrote: Files opened on Windows already have the :crlf layer pushed by default, so you somehow need to get the :encoding layer *below* it. Is it possible to re-write the working statement open(my $fh

RE: encoding(UTF16-LE) on Windows

2011-01-21 Thread Jan Dubois
On Fri, 21 Jan 2011, Erland Sommarskog wrote: > > There is still one thing that is not clear to me. The incorrect end-of-line > was > > 0D 00 0A > > But the way you describe it, I would expect it to be > > 0D 0A 00 I went back to the very first message in the thread, where you write: | Wh

RE: encoding(UTF16-LE) on Windows

2011-01-20 Thread Jan Dubois
On Thu, 20 Jan 2011, Erland Sommarskog wrote: > One can sense some potential for improvements. Not the least in the > documentation area. This is open source. Patches welcome! This is how things get better. Cheers, -Jan

RE: encoding(UTF16-LE) on Windows

2011-01-20 Thread Jan Dubois
On Thu, 20 Jan 2011, Michael Ludwig wrote: > Erland Sommarskog schrieb am 20.01.2011 um 08:29 (-): > > "Jan Dubois" (j...@activestate.com) writes: > > > You need to stack the I/O layers in the right order. The :encoding() > > > layer needs to come last (b

RE: encoding(UTF16-LE) on Windows

2011-01-19 Thread Jan Dubois
On Wed, 19 Jan 2011, Michael Ludwig wrote: > Erland Sommarskog schrieb am 17.01.2011 um 13:57 (-): > > I'm on Windows and I have this small script: > > > >use strict; > >open F, '>:encoding(UTF-16LE)', "slask2.txt"; > >print F "1\n2\n3\n"; > >close F; > > > > When I open the out

RE: utf8 pragma, lexical scope

2010-09-09 Thread Jan Dubois
On Thu, 09 Sep 2010, Michael Ludwig wrote: > > What does not work, however, is to have a variable $käse under utf8 > and then try to refer to it from inside a "no utf8" block, using either > encoding. Without the utf8 pragma, identifiers are not allowed to have > funny characters. (Yes, it was a s

RE: Win32 *W functions and old -C behavior

2006-10-31 Thread Jan Dubois
Oleg writes: > Once upon a time using -C on Win32 made Perl use *W functions, but > after several versions it was removed, causing all kind of headache > to people who used it in their programs and hoped that they won't > have problems any longer with accessing filenames written in different > scri

RE: Perl and unicode file names

2005-02-24 Thread Jan Dubois
On Thu, 24 Feb 2005, Ed Batutis wrote: > So the problem I have is how to proceed. Should I give up with > Perl and use Java or C? Any suggestions gratefully received. > > I started a really 'fun' flame war on this topic several months ago, > so I hesitate to say anything more. But, yes

RE: Unicode filenames on Windows with Perl >= 5.8.2

2004-06-25 Thread Jan Dubois
On Fri, 25 Jun 2004, Nick Ing-Simmons wrote: > Nicholas Clark <[EMAIL PROTECTED]> writes: >> My only thought is should the API be full SVs, or char pointer plus >> utf8/not flag? (possibly as 1 bit in a flags word) > > My gut reaction is that the char * + flag would be easier to shoe-horn > into ex

RE: Unicode filenames on Windows with Perl >= 5.8.2

2004-06-21 Thread Jan Dubois
On Mon, 21 Jun 2004, Steve Hay wrote: > Jan Dubois wrote: >> You need to call CreateFileW() to open a file with a Unicode name. If >> you want to hack something, then I would suggest to write a little XS >> module that just swaps out the file handle in a PerlIO*

RE: Unicode filenames on Windows with Perl >= 5.8.2

2004-06-21 Thread Jan Dubois
> I'm trying to figure out if I can handle Unicode filenames on > Windows using Perl 5.8.4, and if so, how. [...] > So my question is: How can I deal with these files? > > I've tried using Perl scalars containing UTF-8, UTF-16LE and > UTF-16BE encodings of the filenames, but none of them work

Re: Info required - "Wide API calls" in Win32 Perl >= 5.8.2

2004-02-19 Thread Jan Dubois
On Thu, 19 Feb 2004 22:03:14 +0200, Jarkko Hietaniemi <[EMAIL PROTECTED]> wrote: >> After switching from perl 5.8.0 build 806 to perl 5.8.2 build 808 >> I found that the ability to invoke Win32 wide api calls was silently >> removed (-C command line switch or ${^WIDE_SYSTEM_CALLS}=1). > >Well, not

Re: DBD:ADO, DBI and UTF-8 (was: dbi and utf8)

2003-12-07 Thread Jan Dubois
On Sun, 7 Dec 2003 17:10:48 +0100, Stefan Ram <[EMAIL PROTECTED]> wrote: > (Intro: The problem is how to retrieve a unicode > character from a Jet-Database using DBI and DBD-ADO.) > >On Sat, Dec 06, 2003 at 11:47:51PM +0800, Autrijus Tang wrote: >> Hence, you'd need to explicitly convert bytestr

Re: encoding...

2003-11-02 Thread Jan Dubois
On Sun, 2 Nov 2003 23:24:41 +, John Delacour <[EMAIL PROTECTED]> wrote: >Question 1. > >In this script I would like for convenience' sake to use variables in >the second line, but I don't seem to be able to do so. Am I missing >something or is is simply not possible? > > >$source = 'MacRoma