Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007483opensim[GRID] Asset Servicepublic2015-03-04 15:082015-03-04 15:08
ReporterDev Random 
Assigned To 
PlatformIntel i5 430M, 4GBOSLinuxOS VersionUbuntu 12.04 LTS
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0007483: OpenSim treats SL spec field length as characters instead of bytes.
DescriptionThe SL page on limits ( [^]) specifies that a Prim description length limit is "127 bytes UTF-8 string". OpenSimulator does not enforce this limit, but rather enforces a 128 character limit. While this allows for maximum single-byte UTF-8 character content, it also allows for massive overruns in the field, since UTF-8 characters can be up to 4 bytes in size ( [^]).

e.g. A prim description consisting of 127 * 3-byte UTF-8 characters (? = e2 98 ba) can reach 381 bytes... far more than the specified 127.

Over-long descriptions do not display correctly in the Edit dialog (I'm using Singularity).

  public static readonly int MAX_ASSET_DESC = 128;


  string assetDescription = asset.Description;
  if (asset.Description.Length > AssetBase.MAX_ASSET_DESC)
      assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC);
          "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
          asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);

The attached LSL script demonstrates the issue.

State 1: Characters = 120, Bytes = 120


State 2: Characters = 120, Bytes = 240


State 3: Characters = 120, Bytes = 360


Steps To Reproduce* Drop the attached script "Unicode_Demo.lsl" into a prim.
* Touch the prim to cause it to cycle between its 3 states.
* Watch the chat window for script output.
* Open the Edit dialog for the prim, and view the description field.
* Close Edit dialog before proceeding, and open it again when in next state.
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (1 Region per Sim)
Physics EngineBulletSim
Script Engine
EnvironmentMono / Linux32
Mono Version2.10
Attached Files? file icon Unicode_Demo.lsl [^] (2,176 bytes) 2015-03-04 15:08

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2015-03-04 15:08 Dev Random New Issue
2015-03-04 15:08 Dev Random File Added: Unicode_Demo.lsl

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker