MbMX


Testing multibyte MarkupExpressions.

Cyrillic alphabet (Bulgarian, Russian...)

 Var1:Петко
 Var2:пм уики
Should output 5, П, етко, тко
* {(strlen "{$:Var1}")}
* {(substr "{$:Var1}" 0 1)}
* {(substr "{$:Var1}" 1)}
* {(substr "{$:Var1}" -3)}

Should output ПЕТКО, петко
* {(toupper "{$:Var1}")}
* {(tolower "{$:Var1}")}

Should output Пм уики, Пм Уики
* {(ucfirst "{$:Var2}")}
* {(ucwords "{$:Var2}")}

Should output 5, П, етко, тко

  • 5
  • П
  • етко
  • тко

Should output ПЕТКО, петко

  • ПЕТКО
  • петко

Should output Пм уики, Пм Уики

  • Пм уики
  • Пм Уики

Latin/Roman strings in UTF-8 work as before.

 Var3:Petko
 Var4:pm wiki
Should output 5, Pe, tko, ko
* {(strlen "{$:Var3}")}
* {(substr "{$:Var3}" 0 2)}
* {(substr "{$:Var3}" 2)}
* {(substr "{$:Var3}" -2)}

Should output PETKO, petko
* {(toupper "{$:Var3}")}
* {(tolower "{$:Var3}")}

Should output Pm wiki, Pm Wiki
* {(ucfirst "{$:Var4}")}
* {(ucwords "{$:Var4}")}

Should output 5, Pe, tko, ko

  • 5
  • Pe
  • tko
  • ko

Should output PETKO, petko

  • PETKO
  • petko

Should output Pm wiki, Pm Wiki

  • Pm wiki
  • Pm Wiki

Japanese characters

 Var5:日本語での利用について
Should output 11, 日, 用について, ついて
* {(strlen "{$:Var5}")}
* {(substr "{$:Var5}" 0 1)}
* {(substr "{$:Var5}" 6)}
* {(substr "{$:Var5}" -3)}

Should output 11, 日, 用について, ついて

  • 11
  • 用について
  • ついて
 0: 00.00 00.00 config start
 1: 00.02 00.01 config end
 2: 00.22 00.21 MarkupToHTML begin
 3: 00.22 00.21 MarkupToHTML begin
 4: 00.23 00.22 MarkupToHTML end
 5: 00.23 00.22 MarkupToHTML begin
 6: 00.23 00.22 MarkupToHTML end
 7: 00.23 00.22 MarkupToHTML begin
 8: 00.23 00.22 MarkupToHTML end
 9: 00.24 00.23 MarkupToHTML end
10: 00.24 00.23 MarkupToHTML begin
11: 00.25 00.24 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
12: 00.26 00.24 ReadApprovedUrls SiteAdmin.ApprovedUrls end
13: 00.26 00.25 MarkupToHTML end
14: 00.26 00.25 MarkupToHTML begin
15: 00.27 00.25 MarkupToHTML end
16: 00.27 00.25 now
Peak memory: 3,833,432 bytes