SplitStr does not accept scandinavian special alphabets

Report any Hollywood bugs here
Post Reply
Bugala
Posts: 776
Joined: Sun Feb 14, 2010 7:11 pm

SplitStr does not accept scandinavian special alphabets

Post by Bugala » Wed Jan 30, 2019 12:04 pm

array, c = SplitStr("AmigaOS3öMorphOSöAmigaOS4öWarpOSöAROS", "ö")
For k = 1 To c Do NPrint(array[k - 1])

results in:

Error in line 1 (Unnamed2): Wrong usage/parameters for this command!
Read the documentation!

User avatar
airsoftsoftwair
Posts: 3065
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SplitStr does not accept scandinavian special alphabets

Post by airsoftsoftwair » Sat Feb 02, 2019 12:35 pm

Yes, this is a known limitation. SplitStr() currently needs a single byte as a separator and Scandinavian characters will be two bytes in UTF-8. As a workaround, you could switch to ISO 8859-1 mode. Then they should work.

User avatar
airsoftsoftwair
Posts: 3065
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SplitStr does not accept scandinavian special alphabets

Post by airsoftsoftwair » Mon Feb 04, 2019 5:30 pm

Code: Select all

- Fix: SplitStr() didn't work with UTF-8 characters that contained more than one byte

Post Reply