Future reliability of length() 
Author Message
 Future reliability of length()

Hi,

Is length(string) a reliable way to get the number of characters from
a string, or is Perl someday going to use Unicode, or does this depend
on C?

dave



Sun, 30 Nov 2003 01:56:01 GMT  
 Future reliability of length()

Quote:

> Hi,

> Is length(string) a reliable way to get the number of characters from
> a string, or is Perl someday going to use Unicode, or does this depend
> on C?

> dave

I never had any problems with that


Tue, 02 Dec 2003 21:12:39 GMT  
 Future reliability of length()
Quote:

>Hi,

>Is length(string) a reliable way to get the number of characters from
>a string, or is Perl someday going to use Unicode, or does this depend
>on C?

I've seen national language support introduced to our database engines
(Informix). There, the theory was:

length() reports true length of string in bytes as usual. All usual substr()
equivalents do what they do, so you can end up slicing a string in
mid-character.... New language-aware functions were added to support logical
actions on the strings, and their number positioning matched quite well with
the standard functions.

One thing the engine does is assign a language set to the database and the
user environment, and that implicitly controls the character set recognised
and used.

--
When I grow up, I want to be a Principal or a caterpillar!
- Ralph Wiggam
..  ... .--. .. -  --- -.  --- .-. .- -.-. .-.. .



Fri, 05 Dec 2003 09:12:38 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Debugger reliability

2. NET::FTP reliability

3. Reliability of random numbers

4. "reliability" of Win32 perl distribution

5. Error in LWP [Bad arg length for Socket::unpack_sockaddr_in, length is 0, should be 16]

6. Error in LWP [Bad arg length for Socket::unpack_sockaddr_in, length is 0, should be 16]

7. Bad arg length for Socket::unpack_sockaddr_in, length is 0

8. Error in LWP [Bad arg length for Socket::unpack_sockaddr_in, length is 0, should be 16]

9. $length =@{$array_ref}; doesn't return length

10. tkperl, in the future do you need to link in tk7.3

11. htgrep.pl/future RESERVED words

12. Perl and the Mac (Really on desired future enhacements)

 

 
Powered by phpBB® Forum Software