Be careful with Unicode ... it's an all too common misconception that
Unicode = double byte ...

Taken from the Unicode FAQ section
http://www.unicode.org/faq/basic_q.html#19

Q. I understand that all Unicode characters are 16 bits, and that the high
byte is used to switch between code blocks. Is that correct?
A. Absolutely not! Unicode characters may be encoded at any code point from
U+0000 to U+10FFFF. The size of the code unit used for expressing those code
points may be 8 bits (for UTF-8), 16 bits (for UTF-16), or 32 bits (for
UTF-32) [See UTF & BOM]. Even when Unicode characters are expressed with
16-bit code units, there is no concept of a high byte switching values
between "code pages" expressed in the low byte. The entire 16-bit value
expresses the entire character, period. [KW]

hope that helps ...

Mark

----- Original Message -----
From: "Gyrus" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, January 30, 2003 8:35 AM
Subject: Re: Size of string in Bytes


> ----- Original Message -----
> From: "Sean Daniels" <[EMAIL PROTECTED]>
> > Anyone know of an easy way to get the size of a string in bytes?
>
> Wouldn't Len(string) do it? Assuming 1 byte per character, of course. The
> only common exception I can think of is Unicode - but if you're storing in
> Unicode, Len(string)*2 would do it.
>
> Gyrus
> [EMAIL PROTECTED]
> work: http://www.tengai.co.uk
> play: http://norlonto.net
> PGP key available
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to