RT3.8 upgrade: forcing ascii email addresses?

Looking at the RT3.8 mysql upgrade script, I found out that most email
address fields are set to be ASCII characters only:

ALTER TABLE Users MODIFY EmailAddress VARBINARY(120) NULL DEFAULT NULL;

ALTER TABLE Users MODIFY EmailAddress VARCHAR(120) CHARACTER SET ascii
NULL DEFAULT NULL;

This strike me as odd, since email address can contain international
characters, AFAIK. Correct me if I’m wrong.

Mathieu Longtin

Bureau: 1-514-270-7762x230

Portable: 1-514-803-8977

www.dbsoft.ca

Nope, they can not. Only comment and phrase parts of addr_spec can,
but address itself can not.

However, may be soon we’ll see international domains and situation
could be changed, but at this point I think it’s better to stick with
ASCII. Smaller fields - smaller indexes - smaller DB.On Mon, Jul 28, 2008 at 8:23 PM, Mathieu Longtin mlongtin@dbsoft.ca wrote:

Looking at the RT3.8 mysql upgrade script, I found out that most email
address fields are set to be ASCII characters only:

ALTER TABLE Users MODIFY EmailAddress VARBINARY(120) NULL DEFAULT NULL;

ALTER TABLE Users MODIFY EmailAddress VARCHAR(120) CHARACTER SET ascii NULL
DEFAULT NULL;

This strike me as odd, since email address can contain international
characters, AFAIK. Correct me if I’m wrong.

Mathieu Longtin

Bureau: 1-514-270-7762x230

Portable: 1-514-803-8977

www.dbsoft.ca


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Best regards, Ruslan.

I have a hard time believing that the 300M Chinese on the net have an email address spelled with ascii characters, but I just checked with our Exchange server here and on gmail, and both refused a single accented letter in the user name.

So you are right about restricting it.

As for the “smaller field smaller db” excuse, utf8 is the same as ascii as long as you use strictly ascii characters. Also, the last I heard that excuse was for putting centuries in dates, thus saving 2 bytes for each date. We all know where that got us :)From: ruslan.zakirov@gmail.com [mailto:ruslan.zakirov@gmail.com] On Behalf Of Ruslan Zakirov
Sent: July 28, 2008 14:29
To: Mathieu Longtin
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] RT3.8 upgrade: forcing ascii email addresses?

Nope, they can not. Only comment and phrase parts of addr_spec can,
but address itself can not.

However, may be soon we’ll see international domains and situation
could be changed, but at this point I think it’s better to stick with
ASCII. Smaller fields - smaller indexes - smaller DB.

I have a hard time believing that the 300M Chinese on the net have an email address spelled with ascii characters, but I just checked with our Exchange server here and on gmail, and both refused a single accented letter in the user name.

So you are right about restricting it.

As for the “smaller field smaller db” excuse, utf8 is the same as ascii as long as you use strictly ascii characters. Also, the last I heard that excuse was for putting centuries in dates, thus saving 2 bytes for each date. We all know where that got us :slight_smile:

we are talking not about 2 bytes, but about x3 for each row. As far as
I know InnoDB can not pack indexes so every record in the column will
take full possible length in any index using it. Let’s avoid
discussion about characters and their length in bytes when we’re using
UTF-8, but in mysql it will be 3 times longer than ascii. It’s up to
you to decide if it’s cheap or not.

-----Original Message-----
From: ruslan.zakirov@gmail.com [mailto:ruslan.zakirov@gmail.com] On Behalf Of Ruslan Zakirov
Sent: July 28, 2008 14:29
To: Mathieu Longtin
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] RT3.8 upgrade: forcing ascii email addresses?

Nope, they can not. Only comment and phrase parts of addr_spec can,
but address itself can not.

However, may be soon we’ll see international domains and situation
could be changed, but at this point I think it’s better to stick with
ASCII. Smaller fields - smaller indexes - smaller DB.

Looking at the RT3.8 mysql upgrade script, I found out that most email
address fields are set to be ASCII characters only:

ALTER TABLE Users MODIFY EmailAddress VARBINARY(120) NULL DEFAULT NULL;

ALTER TABLE Users MODIFY EmailAddress VARCHAR(120) CHARACTER SET ascii NULL
DEFAULT NULL;

This strike me as odd, since email address can contain international
characters, AFAIK. Correct me if I’m wrong.

Mathieu Longtin

Bureau: 1-514-270-7762x230

Portable: 1-514-803-8977

www.dbsoft.ca


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Best regards, Ruslan.


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Best regards, Ruslan.