bel icon indicating copy to clipboard operation
bel copied to clipboard

Bel strings think in bytes, not characters

Open masak opened this issue 5 years ago • 1 comments

This:

$ perl -Ilib bin/bel
Language::Bel 0.46 -- msys.
> (len "¦")
2

Should be 1.

masak avatar Oct 26 '20 06:10 masak

Reading perldoc perluniintro and perldoc perlunicode, it seems like the following changes are warranted:

  • binmode on file handles (maybe?)
  • use utf8
  • use feature 'unicode_strings'

masak avatar Oct 26 '20 06:10 masak