phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] HEAD: mysql / max key length for utf8


From: Sigurd Nes
Subject: Re: [Phpgroupware-developers] HEAD: mysql / max key length for utf8
Date: Sat, 22 Apr 2006 19:04:49 +0200
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)

Make sense (and it works fine)

the sql statement for creating the table would be (given the database is
set to utf as default):

CREATE TABLE `phpgw_lang` (
`message_id` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE
latin1_general_ci NOT NULL ,
`app_name` VARCHAR( 100 ) CHARACTER SET latin1 COLLATE latin1_general_ci
DEFAULT 'common' NOT NULL ,
`lang` VARCHAR( 5 ) CHARACTER SET latin1 COLLATE latin1_general_ci NOT
NULL ,
`content` TEXT
) TYPE = MYISAM ;

We might want to introduce a COLLATE-attribute in the field-array in the
table-definition in tables_current.inc.php to be handled by
class.schema_proc_[db_type].inc.php

Regards

Sigurd

Alan Langford wrote:
> Since the message_id and app_name are part of the language independence,
> why not just restrict them to the latin1 character set so they continue
> to use one byte per character? A Chinese (for example) message_id seems
> a little too flexible to me... leave the UTF character sets for fields
> likely to have human readable (rather than developer readable, grin) text.
> 
> On 2006 04 22 11:01, Sigurd Nes wrote:
>> That would restrict the installation to only one language.
>> (this is only tested on windows/MySQL 5.0.18 - I think pre 4.1 - one
>> cannot specify utf8 (utf8_swedish_ci) as collation)
>>
>> Regards
>>
>> Sigurd
>>
>> Dave Hall wrote:
>>> We should change the pk to be message_id, app_name imo
>>>
>>> Cheers
>>>
>>> Dave
>>>
>>> On Fri, 2006-04-21 at 18:14 +0200, Sigurd Nes wrote:
>>>> Problem:
>>>> The PRIMARY KEY ( message_id, app_name, lang ) of table phpgw_lang
>>>> is to long (max key length is 1000 bytes) when creating database as
>>>> utf8 with Mysql.
>>>>
>>>> regards
>>>>
>>>> Sigurd
>>>>
>>>>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]