UTF-8 problems

My window title font is this:

“xft:Verdana:size=13:encoding=iso10646-1”

I’m using UTF-8 in my Gentoo installation. Everything works fine except when I go to a webpage having a title which has the &rsaquo symbol. (It looks like > ) That causes the next warning in console:

[FVWM][convert-charsets]: WARNING - invalid byte sequence during conversion from UTF-8 to ISO8859-1

This page for example has it:

saunalahti.fi

Is warning this caused by FVWM, the fon choice, Firefox or Gentoo? Is there any way to get rid of it? And why is there a conversion as I’m using UTF-8??

[color=red]Edited by theBlackDragon:
–> Moved from Basic questions.[/color]

You tell FVWM to use a non-utf8 encoding, shouldn’t be surprising that it tries to convert UTF-8 symbols then I would think…

I don’t see why it tries to convert to ISO8859-1 though, maybe that’s a subset of ISO10646-1? Or maybe ISO10646-1 isn’t seen as a valid encoding string and it falls back to the default.

Either way, using UTF-8 in your FVWM fonts should fix those problems (if you’re using an UTF-enabled font, that is)

Ok, now I’m being stupid: how do I enable UTF-8? (I actually though that ISO10646-1 did it…). I just want to use Verdana with UTF-8. What should I change:

Style * Font “xft:Verdana:size=13:encoding=iso10646-1”

The docs say:

bump…I’d really like to know what am I doing wrong here and what causes the odd conversion. Is there any way to debug this?

This sort of thing really annoys me, and I’ve been seeing it a lot on certain forums. Bump. Bump, indeed! It really gets under my skin. We’re all volunteers here. Please remember that. You’re not special. Your problem is no more urgent than someone else’s here. You don’t get (or deserve) any special treatment, and you’re lucky you’re getting this reply from me. Although I am only doing this in the hopes that others will benefit from it.

Firstly, it would be wise to check that your version of FVWM actually has been compiled in with XFT support, hence:

fvwm --version | sed -n 2p

You probably will find that to be the case, in which case check your locale settings. I don’t believe you’ve mentioned anywhere which distro you’re using – some have a different way of setting them (the actual place should be in /etc/environment – it’s the only shell-agnostic file that all shells ought to read, but it’s PAM-specific).

When you’ve done that, it should work. Try changing some of the settings.

– Thomas Adam

I’m very sorry about that. I didn’t mean to get any special treatment from anyone or to annoy anyone. But the debug question was real - the “bump” wasn’t necessary. Is there any way to really find what causes the font conversion as I really think I’m using UTF-8 everywhere possible and Verdana should support Unicode.

I also tried some other &…; symbols and there were many that produced the warning. Yet all the symbols were drawn correctly by FVWM. %beta; produced the warning but ² didn’t. Different entities can be found here:

myweb.tiscali.co.uk/whitefiles/b … gs/h04.htm

Most likely all latin-1 enitities don’t cause the conversion. (Well, that’s no too surprising…)

Yes, XFT support is on. I’m using Gentoo. All my locales are “en_US.UTF-8” including LC_ALL and LANG. UTF-8 seems to work properly in all other places besides this particular issue.

Hi,

Could it be as simple as changing default encoding in firefox itself? I had same problems after changing it to ISO-8859-1 it’s disappeared. Not sure if that did the trick, u never know…

Paapaa from Finland? :slight_smile:
I’ve always had problems with UTF-8 myself, and I don’t think any of the systems I’ve tried supports it properly (this doesn’t include linux’s). That’s why I still use iso9xxxx-15 or -1 where I can (I never remember the xxxx -numbers :stuck_out_tongue: )
Isn’t it possible to use “xft:Font:encoding=UTF-8” ?
Also, the above suggestion: is there UTF-8 selected in firefox?

Yep, that’s me! :smiley:

Well, on my Gentoo installation UTF-8 works mostly very well. It is still not perfect - a few hickups here and there.

spends some time reading various web pages

It seems that iso10646-1 defines many kinds of encodings, including UTF-8, UCS-2 and UCS-4. I guess that by “encoding=iso10646-1” FVWM really means UTF-8? Not sure, though. It is also possible to use “StringEncoding=UTF-8:xft:…” syntax, but I couldn’t get it to work. These don’t seem to be equivalent, although I believe that they should be:

Style * Font "xft:Verdana:size=13:encoding=iso10646-1" Style * Font "StringEncoding=UTF-8:xft:Verdana:size=13"

That didn’t seem to affect anything. The odd thing is that FVWM is coverting from UTF-8 to iso8859-1. I have no idea what is causing this, except that it has to do with web page title having Unicode characters. But as my window title font has ISO10646-1 encoding I don’t understand what is being coverted (by whom) to 8859-1.

What is the output from “PrintInfo Locale 1”?

Thanks, didn’t know this feature exists! FVWM always surprises me :slight_smile: This is from PrintInfo Locale 2:

Actually all the “fixed” fonts look odd and I have no idea where they are coming. “daewoo-gothic”??? My default for Xterm in ~/.Xdefaults is “XTermfont: -misc-fixed-medium-r-semicondensed--13-----*-iso10646-1”.

Also the deafault charset is for some reason set to ISO8859-1 eventhough my locale is en_US.UTF-8. How does one affect this setting? Is this a X or FVWM thing?

Found some tip. In $Fvwm_src/libs/FlocaleCharset.c replace FLCXOMCharset = FLCXOMCharsetList[0] by FLCXOMCharset = FLCXOMCharsetList[FLCXOMCharsetList_num-1]

Could you describe a bit more what it does?

EDIT: Actually you don’t have to, I found the bug report:

fvwm.org/cgi-bin/fvwm-bug/in … user=guest

I have to try if this works. I’ll report back later. Thanks for the tip!

And it indeed works! I have no idea if this is a general bugfix that handles all cases but it works in my case also. I can test more if it helps to get this fix included.

(:

I am having the same issue, I get this warning in my ~/.xsession-errors:

[FVWM][convert_charsets]: WARNING - Invalid byte sequence during conversion from UTF-8 to ISO-8859-1
I have XFT support:

$ fvwm --version | sed -n 2p with support for: ReadLine, RPlay, Stroke, XPM, PNG, Shape, XShm, SM, Xinerama, XRender, XFT, NLS
My locale is ca_ES.UTF-8. This is my PrintInfo Locale 1:

[code]FVWM info on locale:
locale: ca_ES.UTF-8, Modifier:
Default Charset: X: ISO8859-1, Iconv: ISO-8859-1, Bidi: No
XOM Charsets: ISO8859-1 ISO8859-1 JISX0208.1983-0 KSC5601.1987-0 GB2312.1980-0 JISX0201.1976-0 ISO10646-1
Number of loaded font: 2

  • Font number 0
    fvwm info:
    Name: xft:Bitstream Vera Sans
    Cache count: 27
    Type: XftFont
    Charset: X: ISO8859-1, Iconv: ISO-8859-1, Bidi: No
    height: 19, ascent: 16, descent: 4
    shadow size: 0, shadow offset: 0, shadow direction:0
  • Font number 1
    fvwm info:
    Name: --fixed-medium-r-semicondensed--13-------,--fixed-medium-r-normal--14-------,---medium-r-normal--16-------
    Cache count: 1
    Type: FontSet
    Charset: X: ISO8859-1, Iconv: ISO-8859-1, Bidi: No
    height: 16, ascent: 14, descent: 2
    shadow size: 0, shadow offset: 0, shadow direction:0[/code]
    PrintInfo Locale 2 gives a longer output, so I will show what I feel could be relevant (familylang):

Xft info: - Vertical font: height: 19, ascent: 16, descent: 4, maw: 22 Pattern has 35 elts (size 48) family: "Bitstream Vera Sans"(s) familylang: "en"(s) style: "Roman"(s) stylelang: "en"(s) fullname: "Bitstream Vera Sans"(s) fullnamelang: "en"(s) slant: 0(i)(s) weight: 80(i)(s) width: 100(i)(s) size: 12(f)(s) pixelsize: 16.6728(f)(s) foundry: "bitstream"(s) antialias: FcTrue(w) hintstyle: 2(i)(w) hinting: FcTrue(w) verticallayout: FcFalse(s) autohint: FcFalse(s) globaladvance: FcTrue(s) file: "/usr/share/fonts/ttf-bitstream-vera/Vera.ttf"(s) index: 0(i)(s) outline: FcTrue(s) scalable: FcTrue(s) dpi: 100.037(f)(s) rgba: 5(i)(w) scale: 1(f)(s)
The thread suggest to modify $Fvwm_src/libs/FlocaleCharset.c (I am unable to see the link in fvwm Bug Tracking System). Is there another alternative? i am using fvwm version 2.5.18.

By the way, I get the warning with konqueror and firefox loading fvwm forums :wink: . Not with Lynx :laughing: . The character in dispute seems to be the ‘o’ in FVWM Forums o Index page.

Thanks for the attention!

We’re on 2.5.26 now, and you’ll still get the error occasionally. Suggest you upgrade.

– Thomas Adam

You are right! I was holding on the (gentoo) stable fvwm, and it is time for a move. I have upgraded to 2.5.26 and the message disappeared. Thanks!!! :smiley:

Sorry for hijacking the thread. But it’s not the first time I see this. I am proxy-maintaining the fvwm ebuilds since taviso left them long ago and I managed to get .25 and .26 into the gentoo portage around one month ago, but they are still in ~arch (testing). I will speak with some people and if needed will open a bug on the gentoo bugzilla. Let’s see if we can get this into stable arch at least for x86 and amd64 (my guess is that it should be done for all the architectures, though I have no means to test them…).

Hopefully, this can alleviate slightly the traffic here and on the mailing lists (not that it’s a big amount, but it’s annoying to see lots of related problems that are, more often than not, fixed with a simple update to the testing branch). By moving those package out of testing into stable arch we should fix the issue from the ground. It’s a pity that those packages take so long to stabilize, being simple as they are to test and try.

Cheers.

Thanks for the message. Let me know if there is a better way of informing on the different issues I encounter or if I can do any testing.

Abrazos!