--- In [email protected], "entropyreduction" <alancampbelllists+ya...@...> wrote: > > --- In [email protected], "Sheri" <sherip99@> wrote: > > > > Above you said from_num, but I guess you meant from_numS > > Sorry, now (unicodePlugin0.73_090805.zip in > http://tech.groups.yahoo.com/group/power-pro/files/0_TEMP_/AlansPluginProvisional/) > > > both from_num and from_nums defines. Synonyms, not aliases (as can't apply a > service that creates a unicode string to a handle). > > > I have problems trying to append nums, and with square bracket notation > > with this version. > > > > ustring.append_fromnum(0x00BC, 0x0020, 0x2153, 0x00A0, 0x2154) ;;doesn't > > work > > Sorry, error, fixed. > > > > local nustring=unicode.repeat("\x20",5) > > > > nustring[0]=0x00BC > > nustring[1]=0x0020 > > nustring[2]=0x2153 > > nustring[3]=0x00A0 ;;doesn't work > > nustring[4]=0x2154 ;;doesn't work > > win.debug("square bracket notation", unicode.to_utf8(nustring)) > > Problem above is that default type for set_char(s) and therefore > for [] set op is string ("u"), so above are not treated as > numbers. Somehow result is target string is shortened. > > Use > use unicode.default_get_set_type("numeric") > > first. >
Oops, somehow that line got lost, sorry about that! BTW, would it be feasible to remove auto-loading of unicode from regex plugin? Instead of giving a unicode handle as subject (for regex.pcre_functions), it is straightforward to use unicode.to_utf8(handle) instead. The possibility to use the actual handle was never documented, so I highly doubt anyone is using that feature. Even if the feature is retained, the user would obviously need to use the unicode plugin (and thereby load it him or herself) in order to create the unicode handle/string wanted for use as a regex subject. Regards, Sheri
