Re: Tk 8.4.11 / Windows XP / Encoding problem



On 17 Jun., 16:09, Roger Niva <ro...@xxxxxxxxxx> wrote:
Mark Janssen wrote:
On Jun 16, 2:37 pm, Roger Niva <ro...@xxxxxxxxxx> wrote:
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             ]

It could very well be that those <10 systems use a system encoding
which does not overlap as well with UTF-8 as all the other systems,
leading to strange effects. It would be worth checking if that's the
case.

That's what I originally thought, but they had the same
region/language/keyboard settings as the others. You cannot control the
encoding in Windows beyond those, can you?

You can. If you have some dos or ansi apps in the mix, they use some
settings in the registry called OemCP and AnsiCP which gives the
codepages to use. There is also a program at MS globalization pages in
MSDN that can set different encodings/codepages for an app. Usually
screws up all kind of things because nearly no one thinks that can
happen.

Michael


.



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. ... but it reported "utf-8" as it should. ... 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. ... but it reported "utf-8" as it should. ... 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. ... but it reported "utf-8" as it should. ... Tcl usually does proper detection of the system encoding. ...
    (comp.lang.tcl)
  • unable to register wsdl document while running the product as a windows2000 service
    ... and windows 2000 on UTF-8. ... If not can you tell me how can i change the encoding of wsdl document from UTF-8 to windows-1252 using apache axis ...
    (microsoft.public.dotnet.framework.webservices)
  • 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)