• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
MAINTENANCE ANNOUNCEMENT - JIRA will undergo maintenance starting 1:00am PDT through 3:00am on Saturday 2010.03.20. Please do not enter issues during this time as the system maybe restarted.
Issue Details (XML | Word | Printable)

Key: SVC-3760
Type: Bug Bug
Status: Fix Pending Fix Pending
Priority: Normal Normal
Assignee: Unassigned
Reporter: Lum Kuhr
Votes: 11
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

Unicode behaviour of llToUpper() and llToLower() is inconsistent between the old LSL VM and Mono (and llToUpper() is broken on both)

Created: 31/Jan/09 01:33 PM   Updated: 11/Jul/09 05:54 AM
Component/s: Scripts
Affects Version/s: 1.25 Server
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Second Life 1.21.6 (99587) Oct 14 2008 17:42:25 (Second Life Release)
Release Notes

You are at 253597.0, 254613.4, 28.0 in Asim Zahra located at sim839.agni.lindenlab.com (64.154.223.84:13001)
Second Life Server 1.25.4.108489
Release Notes

CPU: Intel Core 2 Series Processor (2666 MHz)
Memory: 4094 MB
OS Version: Microsoft Windows Vista Service Pack 1 (Build 6001)
Graphics Card Vendor: ATI Technologies Inc.
Graphics Card: ATI Radeon HD 4800 Series
OpenGL Version: 2.1.8395 Release

libcurl Version: libcurl/7.16.4 OpenSSL/0.9.7c zlib/1.2.3
J2C Decoder Version: KDU
LLMozLib Version: [LLMediaImplLLMozLib] - 2.01.21431 (Mozilla GRE version 1.8.1.13_0000000000)
Packets Lost: 203/76678 (0.3%)
Issue Links:
Relates
 

Last Triaged: 25/Feb/09 03:19 AM
Linden Lab Issue ID: DEV-27956


 Description  « Hide
Under the old VM when faced with the characters Ü Ä and Ö (possibly others) the llToLower() and llToUpper() functions perform the opposite of what you would expect. Under Mono llToLower() works correctly but llToUpper() does not.

Steps to reproduce

default {
  state_entry() {
    llSay(0,llToLower("Lowercase: Ü Ä Ö"));
    llSay(0,llToUpper("Uppercase: ü ä ö"));
  }
}

Under Mono:
Object: lowercase: ü ä ö
Object: UPPERCASE: ü ä ö

Under the old VM:
Object: lowercase: Ü Ä Ö
Object: UPPERCASE: ü ä ö



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
gabriel linden added a comment - 25/Feb/09 04:21 AM
This is slightly wrong, LSL actually does nothing for characters outside the default locale (a-z, A-Z), the example above is just proving it. This is intentional and noted in the wiki.

I've changed Mono to act more correctly as it uses utf-8 strings, it now works correctly for both lltoUpper and lltoLower for characters outside the ascii-7 range.

This change will eventually make its way onto the grid.


Lum Kuhr added a comment - 25/Feb/09 10:13 AM
Just tested it using:

llSay(0,llToLower("Lowercase: Ü Ä Ö ü ä ö"));
llSay(0,llToUpper("Uppercase: Ü Ä Ö ü ä ö"));

and yes, under the old VM the commands do absolutely nothing to the non-ascii characters.

Does this change mean that the same will be true under Mono, or is llToUpper being modified to work with non-ascii the same as llToLower currently does?


Strife Onizuka added a comment - 25/Jun/09 06:43 PM
gabriel, are you fixing this for just Mono or LSO as well?

I'm not at all surprised by this, these function were written long before LSL supported UTF-8.


Strife Onizuka added a comment - 25/Jun/09 06:52 PM
When this fix goes live, remind me to update the documentation.

Void Singer added a comment - 11/Jul/09 05:54 AM
chanelog for 1.27 (in process of going live now) notes this as fixed (presumably only the mono portion)