Change the strategy for the U+FFFD separator handling.

Use a global variable instead. In SL, the optimizer does the replacement automatically, therefore no memory penalty is incurred. In OpenSim, the variable is assigned at run time with llUnescapeURL. The OpenSim separator is also changed from U+001F to U+007F, because most control characters under U+0020 cause problems with exporting when present in script memory.

Fixes #41.
This commit is contained in:
Sei Lisa 2017-09-09 10:33:28 +02:00 committed by Sei-Lisa
parent 8bd8b19e2f
commit d23699fbe6
5 changed files with 22 additions and 18 deletions

View file

@ -48,10 +48,6 @@ def oss_process(filename):
if filename is not None:
f.close()
# The U+FFFD character that AVsitter uses causes problems in OpenSim.
# Replace it with U+001F (Unit Separator) which works fine.
s = s.replace(b'\xEF\xBF\xBD', b'\x1F')
# UUIDs in OpenSim
s = s.replace('f2e0ed5e-6592-4199-901d-a659c324ca94',
'206fcbe2-47b3-41e8-98e6-8909595b8605')