having essentially no limit text strings

This whole dichotomy between string and text variables made sense maybe 10 years ago when memory and CPU was not as cheap and plentiful as it is today. It's a needless diversion nowadays. And the whole idea of text being limited to 32000 characters is equally archaic.


and avoiding overhead in conversions is certainly better.

When it comes to ObjectTools, the overhead is significant. Someone in France did testing and found some operations were >100 times slower in compatibility mode.


I would like to get an idea of what types of hurdles have/will come up - does anyone have a general sense of this?

Do a gmane search for "unicode problems". There aren't that many. The main ones:

- Don't store control characters (or generic binary data) in strings and expect to be able to search on them

- If you need to check if a character is a particular control character, you have to compare with its character code

- C_STRING and ARRAY STRING variables don't exist in Unicode mode, even though you can declare them. Everything is text with a 2GB length limit. So if you were depending on fixed string lengths to clip variable lengths, you will have to check/clip the lengths manually. Note that this does not apply to alpha database fields, 4D handles the length clipping for you as usual.

- The Length() command returns the number of Unicode 16-bit code units in a string. This covers the vast majority of cases, since all living languages can be encoded within a single 16-bit Unicode code unit. If the text requires 2 Unicode 16-bit code units to encode some characters, the number returned by Length() will not match the number of logical "characters". Even then, unless you are iterating through the string character by character, you won't care about this discrepancy.

Regards,

   Aparajita
   www.aparajitaworld.com

   "If you dare to fail, you are bound to succeed."
   - Sri Chinmoy   |   www.srichinmoy.org

_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to