pluma and ISO-8859 text
by Paolo Galtieri
When I use caja, or any file browser, to read a text file that is
encoded in ISO-8859 it uses pluma to read the file. Pluma, however,
fails with this message:
pluma has not been able to detect the character encoding.
Please check that you are not trying to open a binary file.
Select a character encoding from the menu and try again.
I need to explicitly choose ISO-8859 from the Character Encoding drop
down box.
The file program is able to detect that the text file is in ISO-8859
encoding.
How does pluma determine the character encoding, why is it not able to
detect the encoding and display the text file contents?
This is on both F34 and F35.
Paolo
4 months, 3 weeks
OT: Analysing UTF-8 file contents.
by Michael D. Setzer II
Perhaps there is a utility or program that does this.
Have been working with web pages that have some utf-8
characters include. Came up with a program that process
files and creates report files that list all the lines and
positions that include utf-8 characaters. Then another file
that summaries each character with count. Then finally
will do the same and include the utf-8 description of the
character.
Found a list of all utf-8 2 byte 3 byte and 4 byte codes.
Turns out what I found was 122357 characters.
Unfortuntely, they were on pages that only listed around
a 1024? per page, so had to merge it all into a file that
turns out to be 4.4M in size....
Example of process.
218544 allraw.uog (combination of 64 web pages)
2000 allraw.uog.out (contains a total of 2000 uft-8 characters)
28 allraw.uog.out-sum (the 2000 character are 28 uniq ones)
28 allraw.uog.out-sum2 (list with names)
633 uog.csv (I extract 633 lines of contact data)
7 uog.csv.out (Only 7 lines with utf-8 characters)
3 uog.csv.out-sum (Only 3 uniq utf-8 characters
3 uog.csv.out-sum2 (list with names)
122357 utf-8codeslook.csv (4.4M file that has hex codes and des)
Example:
uog.csv.out
131 27 c3b1 [ñ]
131 51 c3b1 [ñ]
276 14 c3a5 [å]
344 18 c381 [Á]
344 29 c3b1 [ñ]
344 48 c381 [Á]
344 59 c3b1 [ñ]
uog.csv.out-sum
2 c381 [Á]
1 c3a5 [å]
4 c3b1 [ñ]
uog.csv.out-sum2
2 c381 [Á] LATIN CAPITAL LETTER A WITH ACUTE (U+00C1)
1 c3a5 [å] LATIN SMALL LETTER A WITH RING ABOVE (U+00E5)
4 c3b1 [ñ] LATIN SMALL LETTER N WITH TILDE (U+00F1)
Those are real simple.
The all file has 28 characters that include some strange ones.
5 e2808b [] ZERO WIDTH SPACE (U+200B)
1 e28092 [‒] FIGURE DASH (U+2012)
44 e28093 [–] EN DASH (U+2013)
2 e28094 [—] EM DASH (U+2014)
Not clear what the Zero Wicth Space is for?
The other 3 here all look the same to me??
Guess just needed to do something. Interesting result.
Progam takes the filename as input and creates the other 3 files.
If utf-8codeslook.csv in directory it creates the sum2 otherwise
skips it. Nice to have long description on some?
File is 4.4M but compresses to 510K as .xz file.
Program findnoascii4.cpp
#include <cstdio>
#include <cstring>
#include <cctype>
#include <cstdlib>
using namespace std;
void testlook(char filename[20]);
int main(int argc,char* argv[])
{
FILE *fp1,*fp2,*fp3;
char line[32000],fileout[80],summary[120];
char code[8],codedes[500],*p1,utf8[8],utf8xchar[8],filename[80],filename2[80];
int count,x;
unsigned char c1,c2,c3,c4;
size_t i;
int j=0;
if (argc<2)
{
printf("Need File name??");
exit(1);
}
fp1=fopen(argv[1],"r");
strcpy(fileout,argv[1]);
strcat(fileout,".out");
fp2=fopen(fileout,"w");
while(!feof(fp1))
{
fgets(line,32000,fp1);
j++;
if(feof(fp1)) break;
if(strlen(line)<4) continue;
for(i=0;i<(strlen(line)-3);i++)
{
if(line[i]<=0)
{
c1=256+line[i];
c2=256+line[i+1];
c3=256+line[i+2];
c4=256+line[i+3];
switch(c1)
{
case 194 ... 223:
fprintf(fp2,"%6d %6ld %2.2x%2.2x
[%c%c]\n",j,(long)i, c1,c2,c1,c2);
i++;
break;
case 224 ... 239:
fprintf(fp2,"%6d %6ld
%2.2x%2.2x%2.2x [%c%c%c]\n",j,(long)i, c1,c2,c3,c1,c2,c3);
i++;
i++;
break;
case 240 ... 244:
fprintf(fp2,"%6d %6ld
%2.2x%2.2x%2.2x%2.2x [%c%c%c%c]\n",j,(long)i, c1,c2,c3,c4,c1,c2,c3,c4);
i++;
i++;
i++;
break;
}
}
}
}
fclose(fp1); fclose(fp2);
sprintf(summary,"cut -b 15-30 <%s | sort | uniq -c >%s-sum",fileout,fileout);
system(summary);
if(!((fp1=fopen("utf-8codeslook.csv","r")))) return 0;
sprintf(summary,"%s-sum %s-sum2",fileout,fileout);
sscanf(summary,"%s %s", filename,filename2);
fp2=fopen(filename,"r");
fp3=fopen(filename2,"w");
while(!feof(fp2))
{
x=fscanf(fp2,"%d %s %s",&count,utf8,utf8xchar);
if(x<0) break;
fp1=fopen("utf-8codeslook.csv","r");
while(1)
{
fscanf(fp1,"%[^;];%[^\n] ",code,codedes);
p1=strstr(code,utf8);
if(p1!=NULL) break;
if(feof(fp1)) break;
}
fprintf(fp3,"%7d %-10s %3s\t%s\n",count,code,utf8xchar,codedes);
fclose(fp1);
}
fclose(fp2); fclose(fp3);
return 0;
}
Perhaps someone else would find it useful, or perhaps
something exist that does something similar that I wasn't
able to find. Some mentioned have run across weird files
with utf-8. Seems to work for what I want.
Was fun figuring it out.
Thanks for your time.
Would be happy to make utf-8codeslook.xz file available
since it was a pain to add all the data from over 100
pages. Could find a single page with the data??
First 5 lines
c280;<control> (U+0080)
c281;<control> (U+0081)
c282;BREAK PERMITTED HERE (U+0082)
c283;NO BREAK HERE (U+0083)
c284;<control> (U+0084)
Some descriptions are almost 500 characters??
4 months, 3 weeks
Realtek RTL88x2BU driver
by Saša Janiška
Hello,
recently I was troubleshooting my father-in-law's computer and ended up
buying TP-Link's AC1300 Wifi USB adapter for which there is no driver
included in the kernel.
I solved his problem by giving him my old Realtek dongle which has
supported driver in the kernel and now I'm left with the newly bought
one.
My machine is connected via Ethernet, but in case that something does
happen with my router, I'd like to have backup solution via phone's
hotspot, so wonder - not strictly related to Fedora - what is the
situation in regard to RTL88x2BU driver get included in the official
Linux kernel since manual building and chasing kernel sources is not
pretty?
Sincerely,
Gour
--
The spirit soul bewildered by the influence of false ego thinks
himself the doer of activities that are in actuality carried out
by the three modes of material nature.
4 months, 3 weeks
Settings anomaly
by Robert McBroom
My systems keep dropping back to the login screen in a fairly short time
of low activity. I use kde on f35 with sddm. I've set the power
management settings to intervals that seem reasonable to my activity,
but if I switch to a different system and then come back to the
original, I'm back to the login screen in much to short a time. Looking
for some other setting for the system.
Found that the setting in kde do not correspond to the settings in
xscreensaver although neither match the observations.
Any ideas?
4 months, 3 weeks
Is wayland still missing virtually all libinput functionality?
by Tom Horsley
I had hoped after wayland had been around this long I might
be able to make my trackball useful by doing whatever is the
wayland equivalent of this (from my mouse setting script):
xinput --set-button-map "$nm" 1 8 3 4 5 6 7 2
xinput --set-prop --type=int --format=8 "$nm" \
'libinput Drag Lock Buttons' 2 1
But if there is an equivalent in wayland my best efforts to
find it were fruitless.
I absolutely cannot use wayland if I can't define drag lock.
A giant trackball like my Kensington expert mouse is utterly
useless without drag lock.
Am I just not searching for the right stuff or is wayland
really this useless?
4 months, 4 weeks
test
by bruce
is list still operational?
4 months, 4 weeks
graphics support on f34
by Paolo Galtieri
Folks,
I recently reported an issue with booting recent kernels. All
kernels after 5.14.18 fail with "Input not supported" being displayed on
the monitor. Originally it was suggested that it might be the KVM
switch I use to connect my systems. Today I removed the switch and
directly connected the monitor to the system. I still get the "Input
not supported" message. The system is a Dell T440 server and it uses a
Matrox G200eR2 graphics card with 16 MB capacity.
I have 2 systems running F34 and the problem only occurs on this system.
I really would like to get this working so any help is appreciated.
Paolo
4 months, 4 weeks
Teamviewer/Quickassist install Windows XP ?
by Ger van Dijck
Hai All,
Maybe a strange question because it concerns not Fedora : Teamviewer
does not support Windows XP and Windows 7 anymore .
So the question is how can I download and install Quickassist for
Windows XP and Windows 7 ?
I am not in love with Microsoft.
Any help would be usefull.
Regards,
Ger van Dijck.
4 months, 4 weeks