[Gambas-user] Len function not correct?

Emil Lenngren emil.lenngren at ...626...
Mon Dec 31 13:56:53 CET 2012


The Len function counts the number of bytes in the string. Strings are
always in UTF-8, so é is two bytes. String.Len counts the number of
characters.

2012/12/31 Johny Provoost <johny.provoost at ...27...>

> Thank you, that's working.
>
> Johny
>
> Op 31-12-12 12:28, M. Cs. schreef:
> > Use String.Len() instead if you plan to use non ASCII characters. The é
> is
> > theproblem for Len().
> >
> > 2012/12/31 Johny Provoost <johny.provoost at ...27...>
> >
> >> Why is Len("Andre") = 5, and Len("André") = 6?
> >> The same for words with ë, ú, ê ......
> >> Is there's a particular reason for that, or is it a bug?
> >>
> >> Working in Ubuntu 12.04
> >> QT4
> >> Gambas 3..3.90 , a trunk version from 14 day's ago (don't know the
> >> correct number)
> >>
> >> Happy 2013
> >> Johny
> >>
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> >> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> >> MVPs and experts. SALE $99.99 this month only -- learn more at:
> >> http://p.sf.net/sfu/learnmore_122412
> >> _______________________________________________
> >> Gambas-user mailing list
> >> Gambas-user at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> >>
> >
> ------------------------------------------------------------------------------
> > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> > MVPs and experts. SALE $99.99 this month only -- learn more at:
> > http://p.sf.net/sfu/learnmore_122412
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
> --
>
>
>
> *Vriendelijke Groeten*
>
> *Johny Provoost*
>
> *mailto: johny.provoost at ...27... <mailto:johny.provoost at ...27...>*
>
> *mailto: johny.provoost at ...626... <mailto:johny.provoost at ...626...>*
>
> *Website:* *http://www.johnyprovoost.net* <http://www.johnyprovoost.net/>
>
>
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122412
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list