6.14.8.2. Omega Translation Process

Here is the Omega Translation Process source for converting UTF-8 to unicode.
Start data section to interscript/utilities/inutf8.otp[1 /1 ]
     1: % UTF-8 to Unicode input filter
     2: input: 1;
     3: output: 2;
     4: expressions:
     5: @"00-@"7F => \1;
     6: (@"C0-@"DF) (@"80-@"BF) => #((\1-@"C0) * 64 + (\2-@"80));
     7: (@"E0-@"EF)(@"80-@"BF)(@"80-@"BF) =>#(((\1-@"E0)*64+(\2-@"80))*64+(\3-@"80));
     8: (@"F0-@"F7)(@"80-@"BF)(@"80-@"BF)(@"80-@"BF) =>#((((\1-@"F0)*64+(\2-@"80))*64+(\3-@"80))*64+(\4-@"80));
     9: (@"F8-@"FB)(@"80-@"BF)(@"80-@"BF)(@"80-@"BF)(@"80-@"BF)=>#(((((\1-@"F8)*64+(\2-@"80))*64+(\3-@"80))*64+(\4-@"80))*64+(\5-@"80));
    10: (@"FC-@"FD)(@"80-@"BF)(@"80-@"BF)(@"80-@"BF)(@"80-@"BF)(@"80-@"BF)=>#((((((\1-@"FC)*64+(\2-@"80))*64+(\3-@"80))*64+(\4-@"80))*64+(\5-@"80))*64+(\6-@"80));
    11: 
End data section to interscript/utilities/inutf8.otp[1]


6.14.8.2.1. Build OCP