[Gambas-user] Split doesn't work properly with non-ascii chars (bug?)
Alberto Torres
dithi at ...600...
Thu Sep 9 14:06:53 CEST 2004
When I pass a non-ascii char to split() separator argument, it seems
that it converts to utf-8 encoding, and split() then uses only the first
byte:
result = Split("Hola¿hola¡hola", "¿") ' I want result be "Hola" and
"hola¡hola"
because utf "¿" is "¿" and utf "¡" is "¡", the result is the same as
Split("Hola¿hola¡hola", "Â"):
Hola
¿hola
¡hola
Could split() use more than a byte so I could also do something like
this? Split("One and two and three", " and ")
Regards
DiThi
More information about the User
mailing list