Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
String.length in utf-8 script

String.length in utf-8 script

2004-02-17       - By Kostas Chatzikokolakis

 Back
Hello,
I develop a flashcom application in greek language. Since flashcom sends
all data in unicode I converted a script file with greek strings in
utf-8, as suggested in the documentation. Strings are displayed
perfectly with trace() in both client and server, however the
String.length property gives an incorrect value.

I attach a minimal utf-8 encoded main.asc script to demonstrate the
problem. It creates a string "A" (the 'A' in greek language) and traces
the string and its length. The string is printed perfectly but length
gives 2 instead of 1. This is problably due to the fact that 'A' is a
double-byte chatacter, using a latin "a" it gives 1! Escaped characters
("\uXXXX") also work fine. Finally, #include-ing the same file in a .fla
file also gives correct results!

Has anyone ever encountered this problem? Am I doing something wrong? Is
there a workaround? Thanks a lot in advance.

Kostas Chatzikokolakis


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Supported by Fig Leaf Software
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Lower Prices for Certified Training! Check out new lower prices for
Certified Macromedia Training from Fig Leaf Software. Expand your
skill set with courses in ColdFusion, Flash, Rich Internet
Applications and .NET in the new year.  Fig Leaf Software provides
the highest caliber instruction at our training centers in Washington  
D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
your location.

Get the details at http://training.figleaf.com/
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: flashcomm-unsubscribe@(protected)
For additional commands, e-mail: flashcomm-help@(protected)

Earn $52 per hosting referral at Lunarpages.