Re: Xaraya Aruba 1.2 roadmap open for comments

Marty Vance <[email protected]> Tue, 31 Mar 2009 16:39:24 -0600
Newsgroups gmane.comp.cms.xaraya.devel
Organization Xaraya
Message-ID <[email protected]>
Petr Vorel wrote:

> Hi all,
> 
> my FR would be 1) to define encoding for database connection - not only 
> because MySQL has still stupidly default encoding as Latin1.
> There are several resources about this problem in Xaraya (the best link 
> I just can't find)
> http://bugs.xaraya.com/show_bug.cgi?id=2758
> http://bugs.xaraya.com/show_bug.cgi?id=6109
> http://www.xaraya.com/index.php/xarbb/topic/2589
> 
> Basically there would be parametter defined in var/config.system.php:
> $systemConfiguration['DB.Encoding'] = 'encoding_name';
> which would be used in query:
> "SET NAMES encoding_name" (don't know if there is better way how to 
> accomplish it with adodb).
> in function &xarDBNewConn($args = NULL) defined in includes/xarDB.php
> Next step would be adjusting installer to allow setting this parametter.
> 

MySQL's default charset settings are one of the most ludicrous things 
I've ever seen.

ADOdb has a SetCharSet method in both the mysqli, oci8 and postgre7 drivers.

While we're at it, we're running 4.93, should upgrade to 4.990.

> I'd skip collation settings as it seems to be more difficult (according 
> to Dracos adodb does NOT support collation).
> This would be at least for mysql and postgresql. I have no idea how is 
> encoding used in sqlite.

SET NAMES takes care of several things, details in this thread in the 
adoDB forums: http://phplens.com/lens/lensforum/msgs.php?id=12467&x=1

Collation has to do (mostly, I think) with how MySQL orders records 
during sort/order by operations involving varchar and text fields.  If 
the charset settings are in sync, I think collation takes care of itself 
for the most part (which may be why adoDB doesn't support setting it).

Speaking of the installer, I've been thinking about expanded db-specific 
settings for a while.  I doubt it would be hard to do.

I'm also considering creating an installer theme so that Xaraya_Classic 
doesn't need to be kept around all the time.  One page template, one 
stylesheet, and images necessary to dress up the output.  I already have 
a hack in Xaraya_Classic/pages/installer.xt that can detect if the 
current script is install.php or upgrade.php.

> 
> 
> 
> 2) only ASCII characters in Short-URLs
> In talks about ASCII characters in Short-URLs in articles I've heard 
> that is has to be defined generally for xaraya.
> 
> So, it would be good to have only ASCII characters in Short-URLs.
> E.g. In Czech "žlutě" would be "zlute", but "zlute" would be also "zlute".
> So is that possible? I mean decoding from short url wouldn't be one way 
> :-( ("zlute" could be "zlute" or "žlutě".) If not, it should be somehow 
> achieved avoiding NON-ASCII characters in Short-URLs.
> 
> There is a bug about this issue:
> http://bugs.xaraya.com/show_bug.cgi?id=3138
> 

The url encoding process would need to differentiate the "zlute" and 
"žlutě" urls somehow when they are both converted to "zlute": "zlute" 
and "zlute2" or something.

> 
> 
> 3) test more with PostgreSQL (several problems with MySQL put me off 
> from ideas to switch from MySQL to my favourite PostgreSQL).
> 
> 

Few of us know/use Postgres, so whatever testing it gets can probably go 
a long way.

> Pev