in reply to Tk UCS-2LE:code point too high

You might try this instead:
my $text="\x{1F642}";
Using the hex version of the decimal value 128578 does seem to work.
--
Kordaff

Replies are listed 'Best First'.
Re^2: Tk UCS-2LE:code point too high
by Anonymous Monk on Jul 01, 2016 at 09:43 UTC

    I tried with several Perl versions and both values break the GUI

      I tried with several Perl versions and both values break the GUI

      Applying Kordaff's suggestion to your code works perfectly for me. ie.

      #!/usr/bin/perl use strict; use warnings; use Tk; my $mw = MainWindow->new; my $text = "\x{1F642}"; $mw->Label(-text => $text)->pack; MainLoop;

      This produces a window with the smiley char. I'm using Tk 804.032 on perl 5.20.3.

        :) different A.M., Tk 804.033, Perl v5.16.1 built for MSWin32-x86-multi-thread,
        $ perl -CSD -MTk -e " tkinit()->Label(-text, qq/\x{1F642}/ )->pack; M +ainLoop; " UCS-2LE:code point "\x{1f642}" too high at .../site/lib/Tk/Widget.pm l +ine 205. at -e line 1.

        line 205 is a call to ->configure, XS land

        perl Tk "code point" "too high", !g perl Tk "code point" "too high" -> Re: Tk Symbola Font viewer

        Basically, something about unicode 6.0 version required, which older versions of perl don't support

        this http://stackoverflow.com/questions/4768049/is-there-a-way-to-fix-the-code-point-too-high-problem-in-perl-tk

        Says Tk only supports Unicode Plane 0, or the Basic Multilingual Plane (BMP), so it won't work, the end, tada

        update: I checked in Tkx/Tcl::pTk it looks wrong (using Tcl/Tk 8.6b1.2), I even eval  .e insert end "smiley face      \u1F642\n" according to How to Use Tcl 8.1 Internationalization Features and it still looks wrong, as in it looks like TWO characters that are not smiley face, so not a font issue, Tk just doesn't support it

        FWIW wxPerl with deja vu font shows two squares , you can copy each individually and get "�" and "�", but if you copy paste them together you get "🙂". Same as what happens in notepad/wordpad.

        Yeah, from pTk copying i get two chars always ὤ2

        So, yeah, wxWidgets looks to support it if you have the right font .