Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oscript Length function comportment

Status
Not open for further replies.

nicolas46

Programmer
Mar 4, 2010
33
FR
Hi !

The livelink I use is : Livelink 9.7.1 UTF8

When i execute this code :
Code:
echo ("------------------")
String test1 = "abcde"
String test2 = "àbcdé"
echo (length(test1))
echo (length(test2))
echo ("------------------")

I have this result :
------------------
5
3
------------------

This is weird but i thought this function has just a problem with "accent" (length doesn't count characters with accent...so i tried this code :

Code:
echo ("------------------")
String test1 = "abcde abc"
String test2 = "àbcdé abc"
echo (length(test1))
echo (length(test2))
echo ("------------------")

I have this result :
------------------
9
5
------------------

5 ! i was expected 7 (number of non accent character) or better...9.

Any idea on how can i solve this ?




 
I've had similar issues running UTF8 chars through Builder, seems like the SDK is not UTF8 compliant, does the code run fine under the server ?

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top