On 2002.11.22, Rob Mayoff <[EMAIL PROTECTED]> wrote:
> +---------- On Nov 22, Dossy said:
> > Any idea what I'm doing wrong?
>
> You're typing iso8859-1 into nscp. nscp doesn't use a Tcl channel for
> input, so it does no charset translation on that input. Hence the system
> encoding is irrelevant. You must only send UTF-8 to nscp, and you'll
> only get UTF-8 back.

This doesn't make sense.  How do you explain this:

    wats:nscp 75> encoding system
    iso8859-1
    wats:nscp 76> set u ¾ÆÆ®¹Ìµð¾î
    ¾ÆÆ®¹Ìµð¾î
    wats:nscp 77> set u
    ¾ÆÆ®¹Ìµð¾î
    wats:nscp 78> regexp {^(.*)$} $u junk m
    1
    wats:nscp 79> set m
    ¾ÆƮ¹̵ð¾î

$u is getting set to what I'd expect it to, but $m isn't.

Also, this is reproducible in an ADP page as well.  (Actually,
that's where the problem I was seeing originally started -- I've
just distilled it down via nscp so I could demonstrate what I
was seeing in my actual code.)

Funny enough, tclsh8.4 does the right thing:

    % set tcl_patchLevel
    8.4.0
    % encoding system
    iso8859-1
    % set u {¾ÆÆ®¹Ìµð¾î}
    ¾ÆÆ®¹Ìµð¾î
    % regexp {^(.*)$} $u junk m
    1
    % set m
    ¾ÆÆ®¹Ìµð¾î

-- Dossy

--
Dossy Shiobara                       mail: [EMAIL PROTECTED]
Panoptic Computer Network             web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)

Reply via email to