> does that help to clarify things in terms of how the locale, utf-8 flag, bytes pragma etc. affect it all?

hmm ... I'm still confused. It seems lc works well while uc wasn't updated yet. Which is counterintuitive.

use strict; use warnings; use utf8; use open qw(:std :utf8); $\="\n"; print "Perlversion $]"; my $SS = "\x{1E9E}"; no locale; print "=== local off LANG=$ENV{LANG}"; print "* TEST UC"; print "$_ -> ",ord($_) for "ß", "\Uß", uc("ß"); print "* TEST LC"; print "$_ -> ",ord($_) for $SS, "\L$SS", lc($SS); use locale; print "=== local on LANG=$ENV{LANG}"; print "* TEST UC"; print "$_ -> ",ord($_) for "ß", "\Uß", uc("ß"); print "* TEST LC"; print "$_ -> ",ord($_) for $SS, "\L$SS", lc($SS);

Can't do lc("\x{1E9E}") on non-UTF-8 locale; resolved to "\x{1E9E}". a +t d:/tmp/job/eszet.pl line 33. Can't do lc("\x{1E9E}") on non-UTF-8 locale; resolved to "\x{1E9E}". a +t d:/tmp/job/eszet.pl line 33. Perlversion 5.032001 === local off LANG=DEU * TEST UC ß -> 223 SS -> 83 SS -> 83 * TEST LC ẞ -> 7838 ß -> 223 ß -> 223 === local on LANG=DEU * TEST UC ß -> 223 ß -> 223 ß -> 223 * TEST LC ẞ -> 7838 ẞ -> 7838 ẞ -> 7838

NB: the warnings happen only when local is used. Which deactivates all conversion here.

Furthermore is ẞ a display problem of the monastery's code blocks, the character prints well inside my emacs.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

update

I suppose Perl follows "unicode rules", but those haven't been updated yet to new "German rules" ...


In reply to Re^2: uc and German eszett "ß" by LanX
in thread uc and German eszett "ß" by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.