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.00 00.00 config end
 2: 00.03 00.02 MarkupToHTML begin
 3: 00.03 00.02 MarkupToHTML begin
 4: 00.04 00.03 MarkupToHTML end
 5: 00.04 00.03 MarkupToHTML begin
 6: 00.04 00.04 MarkupToHTML end
 7: 00.04 00.04 MarkupToHTML begin
 8: 00.04 00.04 MarkupToHTML end
 9: 00.05 00.05 MarkupToHTML end
10: 00.06 00.05 MarkupToHTML begin
11: 00.06 00.06 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
12: 00.07 00.06 ReadApprovedUrls SiteAdmin.ApprovedUrls end
13: 00.07 00.06 MarkupToHTML end
14: 00.07 00.06 MarkupToHTML begin
15: 00.08 00.07 MarkupToHTML end
16: 00.08 00.07 now
Peak memory: 3,214,824 bytes