MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Sven Woltmann Date:February 10 2004 2:50pm
Subject:RE: Foreign Key Reference to a VARCHAR
View as plain text  
You're right - you can only code 65,536 characters with 3 UTF-bytes.

U-00000000 - U-0000007F:  0xxxxxxx  
U-00000080 - U-000007FF:  110xxxxx 10xxxxxx  
U-00000800 - U-0000FFFF:  1110xxxx 10xxxxxx 10xxxxxx   

Once you want to go higher than U-0000FFFF, you need up to 6 bytes:

U-00010000 - U-001FFFFF:  11110xxx 10xxxxxx 10xxxxxx 10xxxxxx  
U-00200000 - U-03FFFFFF:  111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx  
U-04000000 - U-7FFFFFFF:  1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
10xxxxxx  

(http://www.cl.cam.ac.uk/~mgk25/unicode.html)

Anyway... 65,536 is enough for me :)

Sven



> -----Original Message-----
> From: Jochem van Dieten [mailto:jochemd@stripped] 
> Sent: Dienstag, 10. Februar 2004 15:29
> To: Heikki Tuuri
> Cc: mysql@stripped
> Subject: Re: Foreign Key Reference to a VARCHAR
> 
> Heikki Tuuri wrote:
> > 
> > I guess that 4-byte UTF8 characters are not needed. You can code 16 
> > million characters with 3 bytes.
> 
> Yes. But is that also the case if you use the UTF-8 encoding 
> scheme, or can that scheme code less characters with 3 bytes?
> http://ln.hixie.ch/?start=1064324988&order=-1&count=1
> 
> Jochem
> 
> 
> --
> I don't get it
> immigrants don't work
> and steal our jobs
>      - Loesje
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
> http://lists.mysql.com/mysql?unsub=1
> 
> 
> 
Thread
Foreign Key Reference to a VARCHARSven Woltmann10 Feb
Re: Foreign Key Reference to a VARCHARHeikki Tuuri10 Feb
RE: Foreign Key Reference to a VARCHARSven Woltmann10 Feb
  • Re: Foreign Key Reference to a VARCHARHeikki Tuuri10 Feb
    • Re: Foreign Key Reference to a VARCHARJochem van Dieten10 Feb
RE: Foreign Key Reference to a VARCHARSven Woltmann10 Feb