1 Pages (7 items)
Special characters - Special characters encoding - Messages
#1 Posted: 6/2/2021 5:06:43 AM
Hi,
I trie to split string every underscore :
B_net="PM1_to_MM1_gth_vpx_p[0]"
with function :
strsplit(B_net,"_" )=mat("PM1_to_MM1_gth_vpx_p[0]",1,1)
I want to extract here "PM1" and "MM1" with
el(strsplit(B_net,"\005F\" ),1)
el(strsplit(B_net,"\005F\" ),3)
But, the underscore is seen as UTF-16 encoding :
strsplit(B_net,"\005F\" )
Thanks for your help
Regards
Bricemik
I trie to split string every underscore :
B_net="PM1_to_MM1_gth_vpx_p[0]"
with function :
strsplit(B_net,"_" )=mat("PM1_to_MM1_gth_vpx_p[0]",1,1)
I want to extract here "PM1" and "MM1" with
el(strsplit(B_net,"\005F\" ),1)
el(strsplit(B_net,"\005F\" ),3)
But, the underscore is seen as UTF-16 encoding :
strsplit(B_net,"\005F\" )
Thanks for your help
Regards
Bricemik
#2 Posted: 6/2/2021 8:35:52 AM
Hello. Please use the latest stable SMath Studio version.
#3 Posted: 6/2/2021 11:55:13 AM
Hello,
Thank you for your quick feedback
I would like to take this opportunity to thank you for your tool that I use for a few years ago.
Concerning the trouble, I use the lasted stable Smath Studio version : 0.99 build 7822
I import string from a csv file.
The strplit don't recognize the underscore.
However, the findstr does
If I use the strrep function to replace the underscore by the underscore in the string, the strplit recognize the underscore.
Please see below the extract :
text=mat("MM1_To_PM1_presence",1,1)
b_net:el(text,1)="MM1_To_PM1_presence"
strsplit(b_net,"\005F\" )=mat("MM1_To_PM1_presence",1,1)
findstr(b_net,"\005F\" )=mat(4,7,11,3,1)
b_net:strrep(b_net,"\005F\","\005F\" )="MM1\005F\To\005F\PM1\005F\presence"
strsplit(b_net,"\005F\" )=mat("MM1","To","PM1","presence",4,1)
findstr(b_net,"\005F\" )=mat(4,7,11,3,1)
I have this trouble since the lasted stable version.
With the previous stable version, 0.99 build 7610, the split function is ok :
text=mat("MM1_To_PM1_presence",1,1)
b_net:el(text,1)="MM1_To_PM1_presence"
strsplit(b_net,"_" )=mat("MM1","To","PM1","presence",4,1)
findstr(b_net,"\005F\" )=mat(4,7,11,3,1)
b_net:strrep(b_net,"\005F\","\005F\" )="MM1\005F\To\005F\PM1\005F\presence"
strsplit(b_net,"\005F\" )=mat("MM1","To","PM1","presence",4,1)
findstr(b_net,"\005F\" )=mat(4,7,11,3,1)
Please to not take into consideration the space before the parenthesis.
If not, there is a smiley ").
Thanks
Bricemik
Thank you for your quick feedback
I would like to take this opportunity to thank you for your tool that I use for a few years ago.
Concerning the trouble, I use the lasted stable Smath Studio version : 0.99 build 7822
I import string from a csv file.
The strplit don't recognize the underscore.
However, the findstr does
If I use the strrep function to replace the underscore by the underscore in the string, the strplit recognize the underscore.
Please see below the extract :
text=mat("MM1_To_PM1_presence",1,1)
b_net:el(text,1)="MM1_To_PM1_presence"
strsplit(b_net,"\005F\" )=mat("MM1_To_PM1_presence",1,1)
findstr(b_net,"\005F\" )=mat(4,7,11,3,1)
b_net:strrep(b_net,"\005F\","\005F\" )="MM1\005F\To\005F\PM1\005F\presence"
strsplit(b_net,"\005F\" )=mat("MM1","To","PM1","presence",4,1)
findstr(b_net,"\005F\" )=mat(4,7,11,3,1)
I have this trouble since the lasted stable version.
With the previous stable version, 0.99 build 7610, the split function is ok :
text=mat("MM1_To_PM1_presence",1,1)
b_net:el(text,1)="MM1_To_PM1_presence"
strsplit(b_net,"_" )=mat("MM1","To","PM1","presence",4,1)
findstr(b_net,"\005F\" )=mat(4,7,11,3,1)
b_net:strrep(b_net,"\005F\","\005F\" )="MM1\005F\To\005F\PM1\005F\presence"
strsplit(b_net,"\005F\" )=mat("MM1","To","PM1","presence",4,1)
findstr(b_net,"\005F\" )=mat(4,7,11,3,1)
Please to not take into consideration the space before the parenthesis.
If not, there is a smiley ").
Thanks
Bricemik
#4 Posted: 6/2/2021 1:55:57 PM
Please could you attach your worksheet? I cannot reproduce this issue.
#5 Posted: 6/2/2021 3:33:26 PM
Please find attached the files.
Regards
File not found.File not found.
Regards
File not found.File not found.
1 users liked this post
Andrey Ivashov 6/2/2021 4:29:00 PM
#6 Posted: 6/2/2021 4:29:26 PM
Thank you! Reproduced.
Will fix.
Will fix.
1 Pages (7 items)
-
New Posts
-
No New Posts