[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using .XCompose



On Sun, 12 Jul 2020 Ajith R wrote:

Could you please see if any of the lines in this message too behaves
similarly

ie, see whether there are nonbreaking spaces in the message body.

?

The message body --of the message to which I reply-- I saved in the
file ajith_msgbody.txt, which features in the commands below.

  $ grep '%' ajith_msgbody.txt # verify '%' character absent from original
  $ echo $? # exit status of above command; 1 indicates no match found
  1
  $ sed 'y/\xc2\xa0/%/' ajith_msgbody.txt >ajith_msgbody_replace_nbsp.txt
  $

I attach ajith_msgbody_replace_nbsp.txt, which contains a '%'
character wherever a nonbreaking space was in the original.

--
Ce qui est important est rarement urgent
et ce qui est urgent est rarement important
-- Dwight David Eisenhower
Hi All,

I will start with what I did in sequence

Using Konsole from my home directory

1)executed setxkbmap -layout us
2)executed xmodmap which gave the following output

xmodmap:% up to 4 keys per modifier, (keycodes in parentheses):

shift% % % %Shift_L (0x32),% Shift_R (0x3e)
lock% % % % Caps_Lock (0x42)
control% % %Control_L (0x25),% Control_R (0x69)
mod1% % % % Alt_L (0x40),% Alt_R (0x6c),% Meta_L (0xcd)
mod2% % % % Num_Lock (0x4d)
mod3% % %%
mod4% % % % Super_L (0x85),% Super_R (0x86),% Super_L (0xce),% Hyper_L (0xcf)
mod5% % % % ISO_Level3_Shift (0x5c),% Mode_switch (0xcb)

3)executed xmodmap -pk > xmm

The file named xmm is attached

4) executed setxkbmap -print which gave the following%

xkb_keymap {
% % % % xkb_keycodes% { include "evdev+aliases(qwerty)" };
% % % % xkb_types% % %{ include "complete"% % % };
% % % % xkb_compat% % { include "complete"% % % };
% % % % xkb_symbols% %{ include "pc+us+inet(evdev)"% % %};
% % % % xkb_geometry% { include "pc(pc104)"% % %};
};

5) execute grep $'\x00A0' .XCompose. All lines from the .XCompose file were listed.
So, I replaced the .XCompose file and retyped the three lines (with only space typed using the space bar of the kyboardbetween the letters) and executed the grep command. Again it returned all lines. So, I replaced .XCompose file with just the W line. Again that line was reported by grep. So, I abandoned Kate and built one using cat > .XCompose followed by the line <W> : "This replaces W", followed by Enter and Ctrl+D. The grep command returned the line.

I noticed that there is $ sign before the search string, which I couldn't understand. I removed it and re-executed the new grep command grep '\x00A0' .XCompose. Now it doesn't return the line

6) The command grep "W" .XCompose | tr $'\xc2\xa0' \! returns%
grep "W" .XCompose | tr $'\xc2\xa0' \!

7) I typed W (holding down shift and pressing w). The Konsole (the instance from which I issued the command as well as a new instance) did nothing except displaying the W. I typed W in Kate with the same result.


Is it safe to say that the .XCompose file doesn't have the nonbreaking spaces?


> You can print all lines of sometextfile which contain them by doing
> this:

> $ grep $'\xc2\xa0' sometextfile

Is the $ just before the search string in single quotes in the grep command intentional? If so, what is its significance?


> '!' marks the spot of nonbreaking spaces that made it into OP's first
> report of odd behavior, upon testing the white scissors XCompose rule:

Could you please see if any of the lines in this message too behaves similarly? If so, isn't possible that the mail system adds them?%
BTW, I understand that OP refers to me; but, what exactly does it stand for? Original Petitioner?

> So those examples, fi and ½, illustrate the difference between
> modification on output and input in English. I can't judge how the OP
> views this, nor whether they are contravening some conventions in
> their own computer culture by trying to make their changes. This
> doesn't even address how a computer responds to a command line
> written in non-latin script.

I am concerned with the internal representation only. That is, I want <U0D19> to be replaced with <U0D19> < U0D4D> <U0D19>. The display of this sequence as a ligated conjunct or as three different symbols is dependant on the font the user has. Whether this sequence is displayed as the ligated conjunct or as three different charcters, it would be read the same. So, there isn't breaking of any langauge semantics% or conventions. All this would bring is some ease of typing a commonly used conjunct.

> I know knothing about DE menus.
> It would appear from others' posts that DEs can change anything
> and everything.

What does DE stand for?

> May I ask how you happened to find the post about providing linux
> support for the Breton keyboard
> https://dominiko.livejournal.com/20206.html

I found it by searching the net

> Try again, for firefox-esr (and with a ~/.XCompose file that is not
> befouled with nonbreaking spaces).

> But make one change to the procedure. When you launch firefox-esr, do
> so like this:

> $ env GTK_IM_MODULE=xim firefox-esr
> Let us know how that goes.

Yet to do this. Will inform


Thanks everyone for all your help,
ajith

Reply to: