Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62395 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23252 invoked from network); 22 Aug 2012 08:16:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Aug 2012 08:16:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:55537] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 82/34-02556-86594305 for ; Wed, 22 Aug 2012 04:16:41 -0400 Received: by obbwc18 with SMTP id wc18so1187321obb.29 for ; Wed, 22 Aug 2012 01:16:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qayo9T16vnxghkhL9wyx400DGSV3ClR4H35kiJLzn+8=; b=RIQ+m8OQ6xjYqcOZB06QOaTe1O89LRgCSmDdhkvbh6fI1HDywQuHP/nBk+oxImGVCC +Gk2WAkPhERKV0OjvHnGd7JyyioMPs+1NbjrJozgaR9feqfHbX9s72jYRLnOnnGUPxH0 tOJBz0fpjK9aa70cGLZ+8BbgWkf9cQxW3Hy/5MzTCjPDtEJRAAsje5ASN82SAnKdVXq+ 5FjRTQxznCcm57QEXtjwfsy9kYALcCrXwkVazJg0JFBaMpa3T6rvVZMVdxuDk8/59ngS L34X2uUVEZSVgnypONsaN5TjMCsZq62Kl3lDX4NOd6WflOnTUFGkFIHl9+x0mg1AP97j 6jEg== MIME-Version: 1.0 Received: by 10.50.154.130 with SMTP id vo2mr1160139igb.71.1345623397701; Wed, 22 Aug 2012 01:16:37 -0700 (PDT) Received: by 10.64.137.101 with HTTP; Wed, 22 Aug 2012 01:16:37 -0700 (PDT) In-Reply-To: <50348488.4000701@hoa-project.net> References: <503388D3.6060403@hoa-project.net> <50348488.4000701@hoa-project.net> Date: Wed, 22 Aug 2012 10:16:37 +0200 Message-ID: To: ivan.enderlin@hoa-project.net Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] UTF-8 files and include From: pierre.php@gmail.com (Pierre Joye) On Wed, Aug 22, 2012 at 9:04 AM, Ivan Enderlin @ Hoa wrote: >> As it may (very often) works smoothly on most unices, it won't work >> ever using current releases or master on Windows. One has to set the >> correct codepage and do the conversion from/to UTF-8. > > Exactly. I can detect if PHP is running on Windows and making the conversion > on-the-fly but what kind of conversion? I have tried with utf8_decode() but > it seems to also fail. It is not possible yet to automatically detect the codepage on Windows. Also it may be changed during the request time (unlikely but possible). But if you know it, say using an configuration parameter, then convert from/to UTF-8 to/from this codepage using mbstring and pass the result to the file functions, require&co. But that's really tricky and buggy. > Any other idea? Yes, don't use UTF-8 in your filenames, that's not portable and bring all kind of issues (not necessary only on windows). I told you that already back then on twitter too when you asked me about this issue. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org