Re: Tk 8.4.11 / Windows XP / Encoding problem



suchenwi wrote:
On 16 Jun., 12:26, Roger Niva <ro...@xxxxxxxxxx> wrote:
schlenk wrote:
On Jun 16, 11:37 am, Roger Niva <ro...@xxxxxxxxxx> wrote:
Hi.
Some of our clients are experiencing a weird problem on their Windows XP PCs.
Our Tcl/Tk software uses "encoding system utf-8", which works beautifully on
99.9% of all PCs, but on a very few of them the entry/text widgets go haywire.
On the troubled PCs, the input fields can work just fine for a while and then
suddenly they start showing other characters instead of the correct utf-8
characters. When this happens it will only affect the input fields. The labels
and textareas which the program itself fills in are ok.
The problem first started popping up here and there around January this year.
Before this, I don't think we had a single case of this problem.
I recently tried to connect to one such PC using TeamViewer(Remote Desktop,
like VNC, PCAnywhere, etc) and the problem went away while I was connected. I
disconnected and the problem was back.
The PC in question that I looked at was a Dell with Windows XP and service pack
3 installed. It was brand new running anti-virus software and was firewalled,
so I doubt a virus has infected it, although you can never be 100% sure about
those things.
I checked the region/keyboard settings and they were clean(only 1 active and
that was the correct one). I also checked to see if the encoding in our
software was wrong, but it reported "utf-8" as it should.
One of our clients also reports that if you add a new user in Windows, it will
work fine for that user for a while and then the problem will be back for that
user, as well.
This does not feel like a Tcl/Tk problem, but I'm hoping someone has come
across this problem before or might share some insight/idea about how to
proceed to figure it out. I have tried looking around, but finding the right
search phrase which will yield me an answer to this slippery problem has so far
eluded me.
--
Vennlig hilsen,
[ Roger Niva / Bibliotek-Systemer As ]
Using encoding system to change the system encoding is nearly always a
bug. Tcl usually does proper detection of the system encoding.
Why are you doing that?
Michael
Hi.

We need our software to be able to show UTF-8 characters and also accept full
UTF-8 input. We have editable textareas which can contain characters from a
multitude of languages simultanously.
One line of text can be Norwegian, the next Thai, then Vietnamese, Arabic, etc.

Inside Tcl and Tk, UTF-8 is most always used. Encoding issues come up
when dealing with the outside - the oerating system, fiules, channels
etc. It is recommended not to change [system encoding], but to use
[fconfigure -encoding] or [encoding convertfrom/to] where needed.

I see. That does not seem to be an optimal solution for us, though, as our software require that all files, channels, inputs and internal storage are all UTF-8. Which is why we chose to use "encoding system utf-8" in the first place.
There are only a very few exceptions and for those we use convertfrom/to.
Guess we cannot use "encoding system" as our "magic bullet", after all.

But, I'm still at a loss about why it "almost works flawlessly" for us.
We're running this on 1.500+ PCs and have only had this "bug" reported for <10 of them.


--
Vennlig hilsen,
[ Roger Niva / Bibliotek-Systemer As ]
.



Relevant Pages

  • Re: Tk 8.4.11 / Windows XP / Encoding problem
    ... Some of our clients are experiencing a weird problem on their Windows XP PCs. ... suddenly they start showing other characters instead of the correct utf-8 ... Tcl usually does proper detection of the system encoding. ...
    (comp.lang.tcl)
  • Re: Tk 8.4.11 / Windows XP / Encoding problem
    ... Some of our clients are experiencing a weird problem on their Windows XP PCs. ... When this happens it will only affect the input fields. ... Tcl usually does proper detection of the system encoding. ...
    (comp.lang.tcl)
  • Tk 8.4.11 / Windows XP / Encoding problem
    ... Some of our clients are experiencing a weird problem on their Windows XP PCs. ... Our Tcl/Tk software uses "encoding system utf-8", which works beautifully on 99.9% of all PCs, but on a very few of them the entry/text widgets go haywire. ...
    (comp.lang.tcl)
  • Re: Tk 8.4.11 / Windows XP / Encoding problem
    ... Some of our clients are experiencing a weird problem on their Windows XP PCs. ... suddenly they start showing other characters instead of the correct utf-8 ... but it reported "utf-8" as it should. ...
    (comp.lang.tcl)
  • Re: Tk 8.4.11 / Windows XP / Encoding problem
    ... Some of our clients are experiencing a weird problem on their Windows XP PCs. ... I also checked to see if the encoding in our ... but it reported "utf-8" as it should. ... Tcl usually does proper detection of the system encoding. ...
    (comp.lang.tcl)