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

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.

Replies are listed 'Best First'.
Re^4: Tk UCS-2LE:code point too high (Tk not support it)
by Anonymous Monk on Jul 01, 2016 at 20:42 UTC
    :) 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 .