DLL doenst work with hashtag

Hello, I have Active X Library and I call it with string value in webpage.show event. Please do you know, why that doesnt work?

Webpage.show event(This work fine):

      dim dbname as string
      dbname = "SRM"
      GetConnectionString(dbname) //method where DLL is calling

The same event, but it doesnt work:

dim textfromlink() as string = Split(Session.HashTag, "/") //I call the project with adress: http://127.0.0.1:8080/#View/SRM/51269
dim dbname as string
dbname = textfromlink(1) // In debug I see in this value "SRM"
 GetConnectionString(dbname) //method where DLL is calling

I don’t know, what I’m doing wrong? String as string, but first way works and second not. Do you think, it’s Xojo Bug?

check all the bytes in the debugger for each & see if the strings are identical at the byte level
they may have different encodings
that may be relevant

Byte level looks same, but I tried encoding to UTF8 and now it works. Thank you Norman.