ç ö ş ü ğ problem

hello everyone,Turkish characters (ç ö ş ü ğ ) are not displayed on Turkish terminals in freebsd 14.How can I solve it? Thanks you .
 
I cannot read Turkish, but for a translation project I have a text file with Turkish characters. They are readable on the console (no x11) and using an x11 terminal. Please check your locale. May be it is configured to something which does not support your language. What is the output of locale? Here it is
Code:
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_ALL=
The command locale -a should output what it is available. I see on my system
Code:
> locale -a|grep tr
tr_TR.ISO8859-9
tr_TR.UTF-8
Therefore I guess tr_TR.UTF-8 might be available on your system, too.
 
I cannot read Turkish, but for a translation project I have a text file with Turkish characters. They are readable on the console (no x11) and using an x11 terminal. Please check your locale. May be it is configured to something which does not support your language. What is the output of locale? Here it is
Code:
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_ALL=
The command locale -a should output what it is available. I see on my system
Code:
> locale -a|grep tr
tr_TR.ISO8859-9
tr_TR.UTF-8
Therefore I guess tr_TR.UTF-8 might be available on your system, too.
Is any of the fonts in /boot/fonts/ support Turkish gryphs?
For example, nothing in it support CJK (at least Japanese) gryphs and need obtaining b16.fnt or something else supporting Japanese gryphs to display Japanese texts in console (vtys by vt(4)).
And now confirmed that mentioned 5 Turkish characters could be displayed with above mentioned b16.fnt with locale below.
Code:
etenv  LANG    ja_JP.UTF-8
setenv  LC_MESSAGES     ja_JP.UTF-8
setenv  LC_ALL  ja_JP.UTF-8
 
I have checked the index as below:
Code:
# head -n 8 /boot/fonts/INDEX.fonts
#
#
# database for vidfont(8)
#
# Format <file>:<lang>:<description>
#
# lang: ar bg cs da de el en es fi fr hr hu hy is it iw ja ko nl no pl
#       pt ro ru sh sk sl sv tr uk zh
root@thinkpad:~ # head -n 15 /boot/fonts/INDEX.fonts
#
#
# database for vidfont(8)
#
# Format <file>:<lang>:<description>
#
# lang: ar bg cs da de el en es fi fr hr hu hy is it iw ja ko nl no pl
#       pt ro ru sh sk sl sv tr uk zh
# lang: lang,lang
#
# Example:
#     terminus-b32.fnt:de:Terminus Schriftart
#     terminus-b32.fnt:en:Terminus font
#
# If lang is empty use 'en' (us-english) as default.
...
There is "tr", so it may be in somehow. But I have installed the Terminus font.
On the other hand I have a file with Japanese text. The signs are displayed as rectangular placeholders only.
To be able to see them in x11 I have installed
Code:
# pkg leaf|grep ja
ja-alias-fonts-1.0_12
ja-font-mona-ttf-2.90_1
 
On the other hand I have a file with Japanese text. The signs are displayed as rectangular placeholders only.
This means that although the code points are supported, the gryphs do not exist or unrecognized. The rectangular place holder character is called "Tofu", as, if displayed as white texts on black background, it looks like Japanese food Tofu (豆腐). And in some cases, a character consisted with thick 2 pararrel horizontal lines (0xE3 0x80 0x93 in UTF-8, U+3013), called Geta as it looks like the footprint of Japanese Geta (下駄), a kind of sandal.

To be able to see them in x11 I have installed
They should work fine on X11 (or maybe Wayland), but do they work for console (vtys)?
 
Now I have checked a second laptop without any Terminus installed. The picture is the same. I can read the Turkish characters on x11 and the console. Japanese characters on the console appear as Tofu, but without text inside. On x11 no Japanese font is installed. The symbols look like Tofu. /boot/fonts/INDEX.fonts is the same as on the first computer I have checked.
 
ekran.png
 
I am not 100% sure since some LC_ are set to C. The vt fonts are located in /usr/share/vt/fonts. Please try a terminus font as vidcontrol -f /usr/share/vt/fonts/terminus-u28b.fnt which should load the terminus font of a certain size and bold. Then try to output text with Turkish characters.
 
# vidcontrol -f /usr/share/vt/fonts/terminus-u28b.fnt
vidcontrol: getting active vty: Inappropriate ioctl for device
 
I am not 100% sure since some LC_ are set to C. The vt fonts are located in /usr/share/vt/fonts. Please try a terminus font as vidcontrol -f /usr/share/vt/fonts/terminus-u28b.fnt which should load the terminus font of a certain size and bold. Then try to output text with Turkish characters.
For me (stable/14), in /usr/share/vt/fonts/,
Code:
% ls -l /usr/share/vt/fonts/
total 1789
-rw-r--r--  1 root wheel  790824  4月 24  2014 b16.fnt
-r--r--r--  1 root wheel   20636  8月 20  2023 gallant.fnt
-r--r--r--  1 root wheel    1965  8月 25  2023 INDEX.fonts
-r--r--r--  1 root wheel   40272  8月 25  2023 spleen-12x24.fnt
-r--r--r--  1 root wheel   57160  8月 25  2023 spleen-16x32.fnt
-r--r--r--  1 root wheel  226696  8月 25  2023 spleen-32x64.fnt
-r--r--r--  1 root wheel    3952  8月 25  2023 spleen-5x8.fnt
-r--r--r--  1 root wheel    5844  8月 25  2023 spleen-6x12.fnt
-r--r--r--  1 root wheel   14776  8月 25  2023 spleen-8x16.fnt
-r--r--r--  1 root wheel   76248  8月 20  2023 terminus-b32.fnt
-r--r--r--  1 root wheel    1532  8月 20  2023 tom-thumb.fnt
-rw-r--r--  1 root wheel 1489104  6月 14  2020 ufo.fnt
-r--r--r--  1 root wheel   36408  8月 20  2023 vgarom-16x32.fnt
-r--r--r--  1 root wheel    8742  8月 20  2023 vgarom-8x14.fnt
-r--r--r--  1 root wheel    9864  8月 20  2023 vgarom-8x16.fnt
-r--r--r--  1 root wheel    5384  8月 20  2023 vgarom-8x8.fnt
-r--r--r--  1 root wheel    5400  8月 20  2023 vgarom-thin-8x16.fnt
-r--r--r--  1 root wheel    2704  8月 20  2023 vgarom-thin-8x8.fnt

If I recall correctly, in the output above, b16.fnt alone is installed manually.

And in /boot/fonts/
Code:
% ls -l /boot/fonts/       
total 187
-r--r--r--  1 root wheel 15355  8月 20  2023 10x18.fnt.gz
-r--r--r--  1 root wheel 15579  8月 20  2023 10x20.fnt.gz
-r--r--r--  1 root wheel 16772  8月 20  2023 11x22.fnt.gz
-r--r--r--  1 root wheel 17078  8月 20  2023 12x24.fnt.gz
-r--r--r--  1 root wheel 17158  8月 20  2023 14x28.fnt.gz
-r--r--r--  1 root wheel 20084  8月 20  2023 16x32.fnt.gz
-r--r--r--  1 root wheel  5874  8月 20  2023 6x12.fnt.gz
-r--r--r--  1 root wheel 12452  8月 20  2023 8x14.fnt.gz
-r--r--r--  1 root wheel  6472  8月 20  2023 8x14v.fnt.gz
-r--r--r--  1 root wheel 12604  8月 20  2023 8x16.fnt.gz
-r--r--r--  1 root wheel  6536  8月 20  2023 8x16b.fnt.gz
-r--r--r--  1 root wheel  6568  8月 20  2023 8x16v.fnt.gz
-r--r--r--  1 root wheel  2087  8月 25  2023 INDEX.fonts

Nothing additionally installed here.

These 2 directories are the place for fonts to be used for vtys.
And the latter could be used by loader, if I recall/understand correctly.

Of course, by specifying full path, other places can be used.
 
FYI:
I have lines below in my /etc/rc.conf to configure keymap and font (to use b16.fnt).
sh:
if [ "vt" = `sysctl -n -q kern.vty` ]
then
  keymap="jp.kbd"
  if [ -r /usr/share/vt/fonts/b16.fnt ] ; then
    allscreens_flags="-f /usr/share/vt/fonts/b16.fnt"
  fi
else
  keymap="jp.106.kbd"
fi

This conditional is because keymap filename was different between ancient sc and current vt. I've started testing vt relatively in early phase after it was introduced into stable branch and needed to go back and forth between both.

And with allscreen_flags instead of invoking vidcontrol -f, the specified font is used for all vtys.
 
Here is a wiki about the old and the new console.
Nowadays vt is the default one. But it can be switched to sc:

Code:
vt_vga defaults to graphics mode.  A loader tunable hw.vga.textmode can be set to use text mode instead.  To enable text mode add the following to /boot/loader.conf:

hw.vga.textmode=1
Do you have such a setting, may be from former times?
 
Are you running these on X11 or Wayland?

On console (vty),
Code:
% vidcontrol -f /usr/share/vt/fonts/b16.fnt
%

But on console emulator on X11 (Mate terminal here),
Code:
% vidcontrol -f /usr/share/vt/fonts/b16.fnt     
vidcontrol: getting active vty: Inappropriate ioctl for device
%

vidcontrol(1) is for console, so you need to install and configure any font including Turkish gryphs for X11 or Wayland differently. Installing fonts can be done via pkg and/or ports, but how to configure fonts for terminal emulators on X11 or Wayland depends on the terminal emulator you are using.
 
I am back now. Regarding the settings of LC_* in post#9:
When I set LC_CTYPE to "not-UTF8" I cannot read the Turkish character anymore.

Please change that setting to C.UTF-8 instead. Using the (t)csh shell it is setenv LC_CTYPE C.UTF-8. Change to tr_TR.UTF-8 should be ok, too.
 
I have tried almost all fonts in /usr/share/vt/fonts/ and can see the Turkish characters.

"Inappropriate ioctl for device" is a second problem when some setting can not be done. I have found a few threads
Thread 55548
Thread 91241
Thread 55208
Regarding your current issue I guess that LC_CTYPE setting is the root cause.
 
"Inappropriate ioctl for device" is a second problem when some setting can not be done.
It shouldn't happen when vidcontrol is run directly on vty driven by vt or sc.
On the other hand, on terminal emulators (X11 and Wayland), they shouldn't have the ioctl that vidcontrol wants.

In man page of vidcontrol(1),
Code:
DESCRIPTION
     The vidcontrol utility is used to set various options for the syscons(4)
     or vt(4) console driver, such as video mode, colors, cursor shape, screen
     output map, font, and screen saver timeout.  Only a small subset of
     options is supported by vt(4).  Unsupported options lead to error
     messages, typically including the text "Inappropriate ioctl for device".
 
Hello.Although the same packages are installed on 2 different PCs, the fact that Turkish characters appear on the terminals on one but not on the other could be hardware related?
 

Attachments

Hello.Although the same packages are installed on 2 different PCs, the fact that Turkish characters appear on the terminals on one but not on the other could be hardware related?
Just installation of same packages is not enough, you gotta replicate the config, correctly and carefully. And these days, it should not be hardware-related like it was 20 years ago.

To quote chrbr :
Regarding your current issue I guess that LC_CTYPE setting is the root cause.
 
Back
Top