Created
May 11, 2009 20:13
-
-
Save phillipadsmith/110156 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" standalone="yes" ?> | |
<!DOCTYPE bugzilla SYSTEM "http://bugs.bricolage.cc/bugzilla.dtd"> | |
<bugzilla version="3.0" | |
urlbase="http://bugs.bricolage.cc/" | |
maintainer="[email protected]" | |
exporter="[email protected]" | |
> | |
<bug> | |
<bug_id>802</bug_id> | |
<creation_ts>2004-09-07 19:17</creation_ts> | |
<short_desc>Set SvUTF8_on on Data Fetched from Database</short_desc> | |
<delta_ts>2004-09-10 23:10:47</delta_ts> | |
<product>Bricolage</product> | |
<bug_status>ASSIGNED</bug_status> | |
<priority>P2</priority> | |
<bug_severity>enhancement</bug_severity> | |
<target_milestone>1.8.3</target_milestone> | |
<everconfirmed>1</everconfirmed> | |
<reporter name="David Wheeler">[email protected]</reporter> | |
<assigned_to name="David Wheeler">[email protected]</assigned_to> | |
<long_desc isprivate="0"> | |
<who name="David Wheeler">[email protected]</who> | |
<bug_when>2004-09-07 19:17:14</bug_when> | |
<thetext>Once a new version of DBI comes out with the necessary UTF-8 tools, use | |
$dbh->{SetUTF8} = 2; | |
To make all of our character issues go away. | |
References: | |
http://bugs.bricolage.cc/show_bug.cgi?id=709#c14 | |
http://www.mail-archive.com/[email protected]/msg03451.html</thetext> | |
</long_desc> | |
<long_desc isprivate="0"> | |
<who name="David Wheeler">[email protected]</who> | |
<bug_when>2004-09-09 14:32:51</bug_when> | |
<thetext>Created an attachment (id=135) | |
Interim Solution | |
This is an interim solution using DBD::Pg's "pg_enable_utf8" attribute. This | |
should turn on the utf-8 flag for all data fetched from the database, thus | |
allowing substr() and friends to work properly. I'd like to get rid of it and | |
use the DBI solution once it's in DBI. I'm hoping that Tim can get it in for | |
1.44.</thetext> | |
</long_desc> | |
<long_desc isprivate="0"> | |
<who name="David Wheeler">[email protected]</who> | |
<bug_when>2004-09-10 03:08:35</bug_when> | |
<thetext>It turns out that the attached patch wasn't enough of an interim solution. | |
With the fix for Bug # 648 committed, other things started to go haywire. | |
It seems that Perl doesn't like to concatenate variables with their UTF-8 | |
flag with others without their UTF-8 flag set. So we were left with two | |
choices: | |
1. Turn off UTF-8 in the data submitted from the browser (the original fix | |
for Bug # 648) and then eliminate all uses of substr(). | |
2. Turn on the UTF-8 flag everywhere so that one is always concatenating | |
UTF-8 to UTF-8 and Perl is happy. | |
The second option turned out to be the only real option, although I did try | |
for a while to do the first. It just wasn't practical. In turning on utf8 | |
everywhere, though, I had to do quite a bit of experimentation to get it | |
right. Thanks to gugod for his help in testing! | |
I'm going to keep this bug report open as an enhancement for now, however, | |
because I still want to switch to using DBI instead of DBD::Pg for setting | |
the UTF-8 flag on all data pulled from the database, just as soon as Tim is | |
able to add it and get a release out.</thetext> | |
</long_desc> | |
</bug> | |
</bugzilla> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment