The Wayback Machine - https://web.archive.org/web/20120620194841/https://jira.secondlife.com/browse/SVC-3760
  • 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.

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)

Details

  • Type: Bug Bug
  • Status: Released Released
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.25 Server
  • Fix Version/s: None
  • Component/s: Scripts
  • Labels:
    None
  • Environment:

Description

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: ü ä ö

Issue Links

Activity

Hide
Void Singer added a comment -

::is confused:: was there another change made to this? or is it just a cleanup of the status?
last I checked, the MONO side was fixed, the LSO side was abandoned; is this still the case?

Show
Void Singer added a comment - ::is confused:: was there another change made to this? or is it just a cleanup of the status? last I checked, the MONO side was fixed, the LSO side was abandoned; is this still the case?
Hide
Void Singer added a comment -

chanelog for 1.27 (in process of going live now) notes this as fixed (presumably only the mono portion)

Show
Void Singer added a comment - chanelog for 1.27 (in process of going live now) notes this as fixed (presumably only the mono portion)
Hide
Strife Onizuka added a comment -

When this fix goes live, remind me to update the documentation.

Show
Strife Onizuka added a comment - When this fix goes live, remind me to update the documentation.
Hide
Strife Onizuka added a comment -

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.

Show
Strife Onizuka added a comment - 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.
Hide
Lum Kuhr added a comment -

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?

Show
Lum Kuhr added a comment - 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?
Hide
gabriel linden added a comment -

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.

Show
gabriel linden added a comment - 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.

People

  • Assignee:
    Unassigned
    Reporter:
    Lum Kuhr
Vote (11)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved:
    Last Triaged:
Morty Proxy This is a proxified and sanitized view of the page, visit original site.