Hi everyone,

There seems to be a problem w/ OpenBD's handling of UTF-8 strings in header 
values. The issue looks identical to the following CF10.0 
bug: https://bugbase.adobe.com/index.cfm?event=bug&id=3830375

Here's a copy & paste of the bug report:

*Problem Description:*
When using cflocation on a UTF-8 encoded page, characters in the URL are 
not correctly encoded.

*Steps to Reproduce:*
<cfprocessingdirective pageencoding="utf-8" />
<cflocation url="/geschäft/" />

*Actual Result:*
Browser redirects to '/gesch%E4ft/'.

*Expected Result:*
Browser redirects to '/geschäft/'.

Defining charset for cfheader doesn't work either. For example:

<cfprocessingdirective pageencoding="utf-8" />
<cfcontent type="text/html; charset=utf-8">
<cfheader name="Location" value="/geschäft/" charset="utf-8">
<cfheader statuscode="302" statustext="Moved Temporarily">

*Response:*
HTTP/1.1 302 Moved Temporarily
Location: /gesch?ft/

If page encoding is set to windows-1252 or iso-8859-1 umlaut-characters (äö 
etc) are encoded properly, but any UTF-8 characters (such as dashes '–') 
are not.

Here's a test URL (in encoded 
format): 
http://www.msn.com/fi-fi/matkailu/artikkeli/varo-n%C3%A4it%C3%A4-huijauksia-%E2%80%93-bangkokin-viisi-tyypillisint%C3%A4-turistiansaa/ar-BBhI1Hw
Decoded: 
http://www.msn.com/fi-fi/matkailu/artikkeli/varo-näitä-huijauksia-–-bangkokin-viisi-tyypillisintä-turistiansaa/ar-BBhI1Hw

*Workaround:*
For now I've handled the redirects by encoding the full URL and replacing 
back the characters that should not be encoded:

<cfscript>
redirectURL = replacelist(
urlencodedformat(redirectURL,"utf-8"),
"%2D,%2E,%5F,%7E,%3A,%2F,%3F,%3D,%26",
"-,.,_,~,:,/,?,=,&");
</cfscript>

But obviously this is far from ideal.

Thoughts? Suggestions?

Thanks!

 Jari

-- 
-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Open 
BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to