1 страниц (7 вхождений)
Special characters - Special characters encoding - Сообщения
#1 Опубликовано: 02.06.2021 05:06:43
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 Опубликовано: 02.06.2021 08:35:52
Hello. Please use the latest stable SMath Studio version.
#3 Опубликовано: 02.06.2021 11:55:13
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 Опубликовано: 02.06.2021 13:55:57
Please could you attach your worksheet? I cannot reproduce this issue.
#5 Опубликовано: 02.06.2021 15:33:26
Please find attached the files.
Regards
Файл не найден.Файл не найден.
Regards
Файл не найден.Файл не найден.
1 пользователям понравился этот пост
Andrey Ivashov 02.06.2021 16:29:00
#6 Опубликовано: 02.06.2021 16:29:26
Thank you! Reproduced.
Will fix.
Will fix.
1 страниц (7 вхождений)
-
Новые сообщения
-
Нет новых сообщений