From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.229.49.16 with SMTP id t16cs181005qcf; Mon, 13 Sep 2010 03:01:35 -0700 (PDT) Return-Path: Received-SPF: pass (google.com: domain of rack-devel+bncCLCeksuGExD77LfkBBoEW9M2JQ@googlegroups.com designates 10.91.107.14 as permitted sender) client-ip=10.91.107.14; Authentication-Results: mr.google.com; spf=pass (google.com: domain of rack-devel+bncCLCeksuGExD77LfkBBoEW9M2JQ@googlegroups.com designates 10.91.107.14 as permitted sender) smtp.mail=rack-devel+bncCLCeksuGExD77LfkBBoEW9M2JQ@googlegroups.com; dkim=pass header.i=rack-devel+bncCLCeksuGExD77LfkBBoEW9M2JQ@googlegroups.com Received: from mr.google.com ([10.91.107.14]) by 10.91.107.14 with SMTP id j14mr2294563agm.41.1284372092776 (num_hops = 1); Mon, 13 Sep 2010 03:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:x-beenthere:received:received :mime-version:received:received:date:in-reply-to:x-ip:references :user-agent:x-http-useragent:message-id:subject:from:to :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type:content-transfer-encoding; bh=lf+68LGzAfil9xZ/AKFWs0QpX3wwPfxuEBJAV+xx0x0=; b=DvzIaRbdJzAKdBAvpZajfy+VxVIIMBpyIp5g5FxVXM6l9XpEdleBznCz1FgBSMBBRr iQQC+pGKhU6AKev8Qhjhh9Cx9H1JCoFH6nALHLqw9S0+YvtYNRMbA8VmRmLAy5defO3E 5M4BxKj8aIL21983mz4CXq+bDmy0E4IuHW1rQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:mime-version:date:in-reply-to:x-ip:references :user-agent:x-http-useragent:message-id:subject:from:to :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type:content-transfer-encoding; b=6eD1jkYKbfej6YDMF0DtulWUBoynjuvk/rWBBNN6JcLuKXA77jt3S48ak5IUQATQ5d JBXoed8IWVdM+KQ3DDursTeyxOGRZuT+Jq60iruQk6s65tDsnbt3MyTFF3sGTlgQxOms Sx/dBmqBlbyjXd1BrVPr0zD3eJPQpNQT3Y/+8= Received: by 10.91.107.14 with SMTP id j14mr364711agm.41.1284372091263; Mon, 13 Sep 2010 03:01:31 -0700 (PDT) X-BeenThere: rack-devel@googlegroups.com Received: by 10.150.48.3 with SMTP id v3ls2797037ybv.5.p; Mon, 13 Sep 2010 03:01:29 -0700 (PDT) Received: by 10.151.143.19 with SMTP id v19mr1079260ybn.33.1284372089613; Mon, 13 Sep 2010 03:01:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.91.107.14 with SMTP id j14mr366418agm.11.1284368746108; Mon, 13 Sep 2010 02:05:46 -0700 (PDT) Received: by q21g2000prm.googlegroups.com with HTTP; Mon, 13 Sep 2010 02:05:46 -0700 (PDT) Date: Mon, 13 Sep 2010 02:05:46 -0700 (PDT) In-Reply-To: X-IP: 218.45.212.2 References: <86810130-684d-413f-aa69-a56f170459e6@m1g2000vbh.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.6 (KHTML, like Gecko) Chrome/7.0.503.0 Safari/534.6,gzip(gfe) Message-ID: Subject: Re: Rack environment encoding From: naruse To: Rack Development X-Original-Sender: yui.naruse@gmail.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, I agree with wycats at almost point. On 9=E6=9C=8813=E6=97=A5, =E5=8D=88=E5=BE=8C1:21, Yehuda Katz wrote: > On Sun, Sep 12, 2010 at 9:48 AM, Hongli Lai wrote: > > I'm unsure what to do with all other variables. Should there be > > requirements about their encodings? > > As far as I can tell, when unescaped, SCRIPT_NAME and PATH_INFO will > always be UTF-8 in the wild (I've tried with quite a number of > browsers). The Utils that unescapes percent encoded Strings should > first mark the String as UTF-8, and then call encode! (which should > almost always be a no-op, unless somewhat made their default_internal > UTF-16 or Latin-1 from some odd reason). I wrote long time ago an web application like /items/. Yeah, new applications should use UTF-8 in URI, but there is such apps. So assumed external encoding: UTF-8 should be configurable. Following thread may be related with this thread. http://rack.lighthouseapp.com/projects/22435/tickets/48-rackutilsunescape-p= roblems-in-ruby-191 Regards