Date: Sun, 29 Jan 2023 10:52:08 +0300 From: Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com> To: Hans Petter Selasky <hps@selasky.org> Cc: Yuri <yuri@aetern.org>, current@freebsd.org Subject: Re: vt and keyboard accents Message-ID: <CAOgwaMv1GdXxsc_8n6NbtnnXe39w0V6JqZR4ro_pNtLttJKY2w@mail.gmail.com> In-Reply-To: <c316280c-8dd8-b969-e623-9fcadab04dd1@selasky.org> References: <70f53d17-46eb-c299-1a93-bf28858c1685@aetern.org> <c316280c-8dd8-b969-e623-9fcadab04dd1@selasky.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Sun, Jan 29, 2023 at 10:16 AM Hans Petter Selasky <hps@selasky.org>
wrote:
> On 1/29/23 01:54, Yuri wrote:
> > Looking into an issue with accents input for vt and cz (so
> > /usr/share/vt/keymaps/cz.kbd) keyboard where some of the accents are
> > working and other result weird unrelated characters output.
> >
> > Checking kbdcontrol -d output, there is an obvious difference with
> > keymap contents -- all mappings are trimmed down to 1 byte after reading:
> >
> > kbdcontrol:
> > dacu 180 ( 180 180 ) ( 'S' 'Z' ) ( 'Z' 'y' ) ( 's' '[' )
> > ( 'z' 'z' ) ( 'R' 'T' ) ( 'A' 193 ) ( 'L' '9' )
> > ( 'C' 006 ) ( 'E' 201 ) ( 'I' 205 ) ( 'N' 'C' )
> > ( 'O' 211 ) ( 'U' 218 ) ( 'Y' 221 ) ( 'r' 'U' )
> > ( 'a' 225 ) ( 'l' ':' ) ( 'c' 007 ) ( 'e' 233 )
> > ( 'i' 237 ) ( 'n' 'D' ) ( 'o' 243 ) ( 'u' 250 )
> > ( 'y' 253 )
> >
> > keymap:
> > dacu 0xb4 ( 0xb4 0xb4 ) ( 'S' 0x015a ) ( 'Z' 0x0179 )
> > ( 's' 0x015b )
> > ( 'z' 0x017a ) ( 'R' 0x0154 ) ( 'A' 0xc1 )
> > ( 'L' 0x0139 )
> > ( 'C' 0x0106 ) ( 'E' 0xc9 ) ( 'I' 0xcd )
> > ( 'N' 0x0143 )
> > ( 'O' 0xd3 ) ( 'U' 0xda ) ( 'Y' 0xdd )
> > ( 'r' 0x0155 )
> > ( 'a' 0xe1 ) ( 'l' 0x013a ) ( 'c' 0x0107 )
> > ( 'e' 0xe9 )
> > ( 'i' 0xed ) ( 'n' 0x0144 ) ( 'o' 0xf3 )
> > ( 'u' 0xfa )
> > ( 'y' 0xfd )
> >
> > Source of the problem is the following definition in sys/sys/kbio.h:
> >
> > struct acc_t {
> > u_char accchar;
> > u_char map[NUM_ACCENTCHARS][2];
> > };
> >
> > While the keymaps were converted to have the unicode characters for vt
> > in the commit below, the array to store them (map) was missed, or was
> > there a reason for this?
> >
> > ---
> > commit 7ba08f814546ece02e0193edc12cf6eb4d5cb8d4
> > Author: Stefan Eßer <se@FreeBSD.org>
> > Date: Sun Aug 17 19:54:21 2014 +0000
> >
> > Attempt at converting the SYSCONS keymaps to Unicode for use with
> > NEWCONS.
> > I have spent many hours comparing source and destination formats,
> > and hope
> > to have caught the most severe conversion errors.
> > ---
> >
> > I have tried the following patch and it allows me to enter all accents
> > documented in the keymap, though I must admit I'm not sure it does not
> > have hidden issues:
> >
> > diff --git a/sys/sys/kbio.h b/sys/sys/kbio.h
> > index 7f17bda76c5..fffeb63e226 100644
> > --- a/sys/sys/kbio.h
> > +++ b/sys/sys/kbio.h
> > @@ -200,7 +200,7 @@ typedef struct okeymap okeymap_t;
> >
> > struct acc_t {
> > u_char accchar;
> > - u_char map[NUM_ACCENTCHARS][2];
> > + int map[NUM_ACCENTCHARS][2];
> > };
> >
>
> Hi,
>
> Using "int" for unicode characters is probably good for now. Your patch
> looks good, but please also consider the "umlaut" case while at it
> (multiple characters that become one)!
>
> --HPS
>
>
I am not an expert on UNICODE .
When character sets are considered , a homogeneous definition for all of
the FreeBSD system would be more useful .
There are mainly three types of Unicode : UTF-8 , UTF-16 , and UTF-32 where
numbers are bit sizes of the characters .
Some pages about Unicode where they have many linked sub pages :
https://en.wikipedia.org/wiki/Category:Unicode
Category:Unicode
https://en.wikipedia.org/wiki/Unicode
Unicode
https://en.wikipedia.org/wiki/Comparison_of_Unicode_encodings
Comparison of Unicode encodings
https://en.wikipedia.org/wiki/List_of_binary_codes
List of binary codes
https://en.wikipedia.org/wiki/List_of_information_system_character_sets
List of information system character sets
and other related pages ...
With my best wishes for all .
Mehmet Erol Sanliturk
[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace;font-size:large"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 29, 2023 at 10:16 AM Hans Petter Selasky <<a href="mailto:hps@selasky.org">hps@selasky.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 1/29/23 01:54, Yuri wrote:<br>
> Looking into an issue with accents input for vt and cz (so<br>
> /usr/share/vt/keymaps/cz.kbd) keyboard where some of the accents are<br>
> working and other result weird unrelated characters output.<br>
> <br>
> Checking kbdcontrol -d output, there is an obvious difference with<br>
> keymap contents -- all mappings are trimmed down to 1 byte after reading:<br>
> <br>
> kbdcontrol:<br>
> dacu 180 ( 180 180 ) ( 'S' 'Z' ) ( 'Z' 'y' ) ( 's' '[' )<br>
> ( 'z' 'z' ) ( 'R' 'T' ) ( 'A' 193 ) ( 'L' '9' )<br>
> ( 'C' 006 ) ( 'E' 201 ) ( 'I' 205 ) ( 'N' 'C' )<br>
> ( 'O' 211 ) ( 'U' 218 ) ( 'Y' 221 ) ( 'r' 'U' )<br>
> ( 'a' 225 ) ( 'l' ':' ) ( 'c' 007 ) ( 'e' 233 )<br>
> ( 'i' 237 ) ( 'n' 'D' ) ( 'o' 243 ) ( 'u' 250 )<br>
> ( 'y' 253 )<br>
> <br>
> keymap:<br>
> dacu 0xb4 ( 0xb4 0xb4 ) ( 'S' 0x015a ) ( 'Z' 0x0179 )<br>
> ( 's' 0x015b )<br>
> ( 'z' 0x017a ) ( 'R' 0x0154 ) ( 'A' 0xc1 )<br>
> ( 'L' 0x0139 )<br>
> ( 'C' 0x0106 ) ( 'E' 0xc9 ) ( 'I' 0xcd )<br>
> ( 'N' 0x0143 )<br>
> ( 'O' 0xd3 ) ( 'U' 0xda ) ( 'Y' 0xdd )<br>
> ( 'r' 0x0155 )<br>
> ( 'a' 0xe1 ) ( 'l' 0x013a ) ( 'c' 0x0107 )<br>
> ( 'e' 0xe9 )<br>
> ( 'i' 0xed ) ( 'n' 0x0144 ) ( 'o' 0xf3 )<br>
> ( 'u' 0xfa )<br>
> ( 'y' 0xfd )<br>
> <br>
> Source of the problem is the following definition in sys/sys/kbio.h:<br>
> <br>
> struct acc_t {<br>
> u_char accchar;<br>
> u_char map[NUM_ACCENTCHARS][2];<br>
> };<br>
> <br>
> While the keymaps were converted to have the unicode characters for vt<br>
> in the commit below, the array to store them (map) was missed, or was<br>
> there a reason for this?<br>
> <br>
> ---<br>
> commit 7ba08f814546ece02e0193edc12cf6eb4d5cb8d4<br>
> Author: Stefan Eßer <se@FreeBSD.org><br>
> Date: Sun Aug 17 19:54:21 2014 +0000<br>
> <br>
> Attempt at converting the SYSCONS keymaps to Unicode for use with<br>
> NEWCONS.<br>
> I have spent many hours comparing source and destination formats,<br>
> and hope<br>
> to have caught the most severe conversion errors.<br>
> ---<br>
> <br>
> I have tried the following patch and it allows me to enter all accents<br>
> documented in the keymap, though I must admit I'm not sure it does not<br>
> have hidden issues:<br>
> <br>
> diff --git a/sys/sys/kbio.h b/sys/sys/kbio.h<br>
> index 7f17bda76c5..fffeb63e226 100644<br>
> --- a/sys/sys/kbio.h<br>
> +++ b/sys/sys/kbio.h<br>
> @@ -200,7 +200,7 @@ typedef struct okeymap okeymap_t;<br>
> <br>
> struct acc_t {<br>
> u_char accchar;<br>
> - u_char map[NUM_ACCENTCHARS][2];<br>
> + int map[NUM_ACCENTCHARS][2];<br>
> };<br>
> <br>
<br>
Hi,<br>
<br>
Using "int" for unicode characters is probably good for now. Your patch <br>
looks good, but please also consider the "umlaut" case while at it <br>
(multiple characters that become one)!<br>
<br>
--HPS<br>
<br></blockquote><div><br></div><div><br></div><div><div style="font-family:monospace;font-size:large" class="gmail_default"></div><br></div><div><div style="font-family:monospace;font-size:large" class="gmail_default">I am not an expert on UNICODE .</div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default">When character sets are considered , a homogeneous definition for all of the FreeBSD system would be more useful .</div><div style="font-family:monospace;font-size:large" class="gmail_default">There are mainly three types of Unicode : UTF-8 , UTF-16 , and UTF-32 where numbers are bit sizes of the characters .<br></div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default">Some pages about Unicode where they have many linked sub pages :</div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default"><a href="https://en.wikipedia.org/wiki/Category:Unicode">https://en.wikipedia.org/wiki/Category:Unicode</a></div></div>Category:Unicode<div><br></div><div><br></div><div><a href="https://en.wikipedia.org/wiki/Unicode">https://en.wikipedia.org/wiki/Unicode</a></div>Unicode<div><br></div><div><a href="https://en.wikipedia.org/wiki/Comparison_of_Unicode_encodings">https://en.wikipedia.org/wiki/Comparison_of_Unicode_encodings</a></div><div>Comparison of Unicode encodings</div><div></div><div><br></div><div><a href="https://en.wikipedia.org/wiki/List_of_binary_codes">https://en.wikipedia.org/wiki/List_of_binary_codes</a></div><div>List of binary codes</div><div><br></div><div><br></div><div><a href="https://en.wikipedia.org/wiki/List_of_information_system_character_sets">https://en.wikipedia.org/wiki/List_of_information_system_character_sets</a></div><div>List of information system character sets</div><div><br></div><div><br></div><div><div style="font-family:monospace;font-size:large" class="gmail_default">and other related pages ...</div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default">With my best wishes for all .</div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default"><br></div><div style="font-family:monospace;font-size:large" class="gmail_default">Mehmet Erol Sanliturk</div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div></div></div>
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOgwaMv1GdXxsc_8n6NbtnnXe39w0V6JqZR4ro_pNtLttJKY2w>
