GBK7U

              In the name of "tr"!

I. Preparing data
=================

As very suitable basis for digital circuits is:

  and, or, not, d-latch

or in electronics:

  resistor, capacitor, inductance (coil), memristor

"tr" is one of the core Unix tools, that's difficult to miss/replace. In case we need unicode support in "tr" -- the sacrifice is huge.

Several possible ways are:

  0. Don't use languages, but English :)

  1. Switch to FreeBSD (constraint removed since 10.x)

  2. Build Heirloom Toolchest from source under XUbuntu 16.10 (everything else is very latest, however Heirloom itself seems to be frozen since 2010 or so..).

Links on "tr"
-------------

0. GNU's got a plan (http://www.pixelbeat.org/docs/coreutils_i18n/, since 01.01.1970, edited Dec 7 '15 at 14:23) to fix that and work is under way but not there yet. FreeBSD or Solaris tr don't have the problem.

  http://unix.stackexchange.com/questions/228558
  /how-to-make-tr-aware-of-non-asciiunicode-characters

1. tr perl unicode implementation

  https://github.com/dlazesz/tr-unicode

2. tr python unicode implementation

  http://emre.github.io/unicode_tr/

3. tr C unicode implementation

  wiki/GNU Core Utilities: Alternative set of utilities with unicode support

  http://heirloom.sourceforge.net/tools.html

4. Some BSD sources

  ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386
      /1.0-RELEASE/ports/textutils/src/tr.c
  https://opensource.apple.com/source/text_cmds/text_cmds-84/tr/tr.c

II. Switching to FreeBSD: Xfce + unicode
========================================

Build console version as in "FreeBSD, Reverse SSH example" part-II here.

0. bash is in /usr/local/bin/bash
   Use chpass to change user login settings.

1. Install xorg, xfce, slim, xfce4-xkb-plugin, firefox, gedit, virtualbox-ose-additions

2.  # cat /etc/rc.conf
    hostname="BSDBox"
    ifconfig_em0="DHCP"
    sshd_enable="YES"
    slim_enable="YES"
    xfce_enable="YES"
    moused_enable="YES"
    dbus_enable="YES"
    hald_enable="YES"
    vboxguest_enable="YES"
    vboxservice_enable="YES"
    dumpdev="AUTO"

3. in /etc/login.conf
   find
        :pseudoterminals
   set
        :pseudoterminals=unlimited:\
        :priority=0:\
        :ignoretime@:\
        :umask=022:\
        :charset=UTF-8:\
        :lang=en_US.UTF-8:
   rebuild database
      # cap_mkdb /etc/login.conf

4. Your error message is well known, bug #8841. You should replace x11/xdm with x11/slim

  # pkg install slim
  # pkg remove xdm

Why are you create ~/.xsession file from scratch? Just copy it like this:

  $ cp /usr/local/etc/xdg/xfce4/xinitrc ~/.xinitrc
  $ ln -sf .xinitrc .xsession

Found here: https://forums.freebsd.org/threads/42381/

Note: /etc/rc.conf should contain line

  slim_enable="YES"

Now reboot

  # init 6

5. Setup keyboard switching (Applications -> Settings -> Keyboard -> Layout) and show selected keyboard language on panel (panel -> add new item -> keyboard layouts: country flag, LU corner)

6. Check
    $ locale
    LANG=en_US.UTF-8
    LC_CTYPE="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_ALL=
NB! Type this, do not copy-paste
    $ echo üõöäšž | tr üõöäšž 123456
    123456

7. Install 386 branch of wine-development, figure out what do you need with

  # pkg search wine

Install notepad++ (windows 7.2 32-bit installer, 64-bit does not work with plugins). Check NppExport plugin is installed and up to date.

III. Code mining vs Data mining
===============================

We start with this next time..
