f



What's wrong with "fconfigure stdout -encoding utf-8" on windows in Tcl 8.5.10

With my built 8.5.10 I tried to issue command "fconfigure stdout -
encoding utf-8" to tclsh on WinXP, the tcl prompt then was shown as
two dots instead of percentage sign,


C:\>tclsh85t.exe
% fconfigure stdout -encoding utf-8
=E2=80=A5date
The current date is: 11/29/2011 Tue
Enter the new date: (mm-dd-yy) time
The system cannot accept the date entered.
Enter the new date: (mm-dd-yy)
=E2=80=A5
=E2=80=A5

So wonder what's wrong with fconfigure on stdout? Is that the issue?

0
wrenashe (13)
11/29/2011 6:46:44 AM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

7 Replies
1245 Views

Similar Articles

[PageSpeed] 9

On Nov 29, 7:46=C2=A0am, "wrena...@gmail.com" <wrena...@gmail.com> wrote:
> With my built 8.5.10 I tried to issue command "fconfigure stdout -
> encoding utf-8" to tclsh on WinXP, the tcl prompt then was shown as
> two dots instead of percentage sign,
>
> C:\>tclsh85t.exe
> % fconfigure stdout -encoding utf-8
> =E2=80=A5date
> The current date is: 11/29/2011 Tue
> Enter the new date: (mm-dd-yy) time
> The system cannot accept the date entered.
> Enter the new date: (mm-dd-yy)
> =E2=80=A5
> =E2=80=A5
>
> So wonder what's wrong with fconfigure on stdout? Is that the issue?

Short answer: Yes.
Longer answer: The encoding in Windows is not UTF-8 but one of cp....
flavors.

Question: what did you expect that to do?

Mark
0
mpc.janssen (384)
11/29/2011 6:59:24 AM
On 29/11/2011 06:59, Mark Janssen wrote:
> Short answer: Yes.
> Longer answer: The encoding in Windows is not UTF-8 but one of cp....
> flavors.

Also, the code that writes to the (genuine) console is rather special as 
there's a direct Unicode-aware Win32/Win64 API for that.

Donal.
0
11/29/2011 3:51:02 PM
On Nov 29, 2:59=C2=A0pm, Mark Janssen <mpc.jans...@gmail.com> wrote:
> On Nov 29, 7:46=C2=A0am, "wrena...@gmail.com" <wrena...@gmail.com> wrote:
>
> > With my built8.5.10I tried to issue command "fconfigurestdout -
> > encoding utf-8" to tclsh on WinXP, thetclprompt then was shown as
> > two dots instead of percentage sign,
>
> > C:\>tclsh85t.exe
> > %fconfigurestdout -encoding utf-8
> > =E2=80=A5date
> > The current date is: 11/29/2011 Tue
> > Enter the new date: (mm-dd-yy) time
> > The system cannot accept the date entered.
> > Enter the new date: (mm-dd-yy)
> > =E2=80=A5
> > =E2=80=A5
>
> > So wonder what's wrong withfconfigureon stdout? Is that the issue?
>
> Short answer: Yes.
> Longer answer: The encoding in Windows is not UTF-8 but one of cp....
> flavors.
>
> Question: what did you expect that to do?
>
> Mark

Thanks, Mark. While if "fconfigure stdout -encoding unicode", tcl
prompt looks ok. What is the difference then? Windows is nicer to
ucs-2 than utf-8?
0
wrenashe (13)
11/29/2011 4:05:39 PM
On Nov 29, 11:51=A0pm, "Donal K. Fellows"
<donal.k.fell...@manchester.ac.uk> wrote:
> On 29/11/2011 06:59, Mark Janssen wrote:
>
> > Short answer: Yes.
> > Longer answer: The encoding in Windows is not UTF-8 but one of cp....
> > flavors.
>
> Also, the code that writes to the (genuine) console is rather special as
> there's a direct Unicode-aware Win32/Win64 API for that.
>
> Donal.

Is there a code trick to show that? Or avoid making windows console
stdout utf-8 in tcl shell?
0
wrenashe (13)
11/29/2011 4:16:19 PM
On 11/29/11 10:05 AM, wrenashe@gmail.com wrote:
> On Nov 29, 2:59 pm, Mark Janssen<mpc.jans...@gmail.com>  wrote:
>> On Nov 29, 7:46 am, "wrena...@gmail.com"<wrena...@gmail.com>  wrote:
>>
>>> With my built8.5.10I tried to issue command "fconfigurestdout -
>>> encoding utf-8" to tclsh on WinXP, thetclprompt then was shown as
>>> two dots instead of percentage sign,
>>
>>> C:\>tclsh85t.exe
>>> %fconfigurestdout -encoding utf-8
>>> =E2=80=A5date
>>> The current date is: 11/29/2011 Tue
>>> Enter the new date: (mm-dd-yy) time
>>> The system cannot accept the date entered.
>>> Enter the new date: (mm-dd-yy)
>>> =E2=80=A5
>>> =E2=80=A5
>>
>>> So wonder what's wrong withfconfigureon stdout? Is that the issue?
>>
>> Short answer: Yes.
>> Longer answer: The encoding in Windows is not UTF-8 but one of cp....
>> flavors.
>>
>> Question: what did you expect that to do?
>>
>> Mark
>
> Thanks, Mark. While if "fconfigure stdout -encoding unicode", tcl
> prompt looks ok. What is the difference then? Windows is nicer to
> ucs-2 than utf-8?

Windows is broken in that it requires programs to use a different C API t=
o=20
do UTF-8 (and some other encodings) to the real console.  IMHO this is=20
because they did not want to upgrade their console software to handle all=
=20
encodings (I think the special APIs convert the UTF-8 to the cp encodings=
).

--=20
+------------------------------------------------------------------------=
+
| Gerald W. Lester, President, KNG Consulting LLC                        =
|
| Email: Gerald.Lester@kng-consulting.net                                =
|
+------------------------------------------------------------------------=
+

0
11/29/2011 6:14:19 PM
On Nov 29, 5:16=C2=A0pm, "wrena...@gmail.com" <wrena...@gmail.com> wrote:
> On Nov 29, 11:51=C2=A0pm, "Donal K. Fellows"
>
> <donal.k.fell...@manchester.ac.uk> wrote:
> > On 29/11/2011 06:59, Mark Janssen wrote:
>
> > > Short answer: Yes.
> > > Longer answer: The encoding in Windows is not UTF-8 but one of cp....
> > > flavors.
>
> > Also, the code that writes to the (genuine) console is rather special a=
s
> > there's a direct Unicode-aware Win32/Win64 API for that.
>
> > Donal.
>
> Is there a code trick to show that? Or avoid making windows console
> stdout utf-8 in tcl shell?

Why do you insist on changing the encoding on stdout. Why not just let
tclsh handling it for you?
% puts \u017d
=C5=BD

works fine for me (on windows and linux) without changing encodings.
So can you please explain why you need to change the encoding of
stdout in the first place.

Mark
0
mpc.janssen (384)
11/30/2011 11:02:43 AM
On Nov 30, 7:02=C2=A0pm, Mark Janssen <mpc.jans...@gmail.com> wrote:
> On Nov 29, 5:16=C2=A0pm, "wrena...@gmail.com" <wrena...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > On Nov 29, 11:51=C2=A0pm, "Donal K. Fellows"
>
> > <donal.k.fell...@manchester.ac.uk> wrote:
> > > On 29/11/2011 06:59, Mark Janssen wrote:
>
> > > > Short answer: Yes.
> > > > Longer answer: The encoding in Windows is not UTF-8 but one of cp..=
...
> > > > flavors.
>
> > > Also, the code that writes to the (genuine) console is rather special=
 as
> > > there's a direct Unicode-aware Win32/Win64 API for that.
>
> > > Donal.
>
> > Is there a code trick to show that? Or avoid making windows console
> > stdout utf-8 in tcl shell?
>
> Why do you insist on changing the encoding on stdout. Why not just let
> tclsh handling it for you?
> % puts \u017d
> =C5=BD
>
> works fine for me (on windows and linux) without changing encodings.
> So can you please explain why you need to change the encoding of
> stdout in the first place.
>
> Mark

There is no a interactive context for my usage to Tcl shell. I run a
script and want "puts" out in utf-8 directly.
0
wrenashe (13)
12/1/2011 2:29:37 AM
Reply:

Similar Artilces:

"::tcl::tm::UnknownHandler ::tclPkgUnknown msgcat 1.4" caused by replacing Tcl 8.4.1 with 8.5.7
In the blog http://planet.larrythecow.org/archives/2009-07-26.html "The Twouble with Tcl" Iain Buchanan shows that redefining OPEN proc leads to the errors similar to what I am getting - when I replaced Tcl 8.4.1 with Tcl 8.5.7. In my case I don't know the exact root cause though ... Any ideas how I should proceed with debugging this issue ? Thanks, Alex tclsh c:/Tornado/host/resource/hutils/tcl/makeSymTbl.tcl ppc tmp.o symTbl.c invalid command name "::tcl::tm::UnknownHandler" while executing "::tcl::tm::UnknownHandler ::tclPkgUnknown msg...

Labview 8.5.1's MathScript window failed running imread with an error &quot;A problem occurred in a subVI call.&quot;
Hi, I am trying to port a Matlab program into a MathScript script.&nbsp; Following is the first few lines of the script:clear;image1=imread('C:\LV_VertAlign\DSC_0104.jpg','jpg');image_double1=im2double(image1);image_gray11=rgb2gray(image_double1);In the first line, imread is supposed to read in a photo taken from a DSLR camera, so I think it's a 32-bit image.&nbsp; And this is the error I got when trying to run this script in the Labview 8.5.1's Mathscript windows:"Error in function imread at line 2.&nbsp; A problem occurred in a subVI call."What i...

checkbuttons in tcl 8.4.12 and 8.5a4 with -offvalue == ""?
Hello, I just realized some differences between the checkbuttons visualisation in tcl 8.4 and 8.5. If the offvalue of a checkbutton is set to "" (empty string) and the checkbutton is not "checked", than ... - in tcl 8.4.12 the background is white - in tcl 8.5a4 the background is grey and the "check" is still visible That's a bug, isn't it? If the offvalue is " " (one blank), than every thing works. Best regards, Martin Lemburg UGS - Transforming the Process of Innovation MartinLemburg@UGS wrote: > Hello, > > I just reali...

Tcl 8.5 & Vim's Tcl interface
[Pardon the leading period, but I'm hoping the indenting is preserved to make reading easier] .. I wanted Vim on windows (x64) that was compiled with Vim's .. Tcl interface. All went fairly well, I was able to build .. Vim using window's SDK command line compiler for x64, and I .. linked against ActiveState's Tcl 8.5.11.0 for x64 using .. tclstub85.lib to allow dynamic loading of the Tcl DLL. .. .. [As an aside, I'm hoping to convince Vim's maintainer to .. build the release version of Vim containing support for all .. the language interfaces since only an error message would .. occur if the respective DLL was not found. It appears that .. the Vim maintainer last checked building against 8.4] .. .. The Tcl interface works for a simple ":tcl puts Hello" but .. when I tried anything more I get the error: .. .. wrong # args: should be "catch command ?varName?" .. .. This is because Vim creates a replacement "catch" command .. (I've attached the relevant code below. As the comments .. state, Vim needs to prevent exit() being called by Tcl. Tcl .. 8.5 has introduced a new "catch" command that takes an .. additional argument, and somewhere -- either the Tcl .. library or tcl85.dll -- uses catch with four arguments. I .. don't have 8.5's source but I see that auto.tcl, clock.tcl, .. init.tcl, (I stopped looking) all use the four-argument catch. .. .. So here's my question: what's the best way this...

FAQ 1.12 What's the difference between "perl" and "Perl"? #8
This is an excerpt from the latest version perlfaq1.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 1.12: What's the difference between "perl" and "Perl"? One bit. Oh, you weren't talking ASCII? :-) Larry now uses "Perl" to signify the language proper and "perl" the ...

What's fd 8? Why extra "read(8, 0xFFBEEA17, 1) (sleeping...)"
I have a problem where scp will stall on a sleep at the end of the transfer. I've done some poking around with truss on scp -v -v -v and found that on the machine that works, there is only one "read(8, 0xFFBEEA17, 1)(sleeping...)" near the beginning: debug1: Found key in /u/app/.ssh/known_hosts:1 debug1: bits set: 1580/3191 read(8, 0xFFBEF33F, 1) (sleeping...) debug1: ssh_rsa_verify: signature correct debug1: kex_derive_keys On the machine that stalls, there is an extra "read(8, 0xFFBEEA17, 1)(sleeping...)" after the file is transferred, causing a stall of 5 minutes: alarm(1) = 0 read(4, "1F9D90 pD2C0 y01A0A0C183".., 8192) = 8192 write(7, "1F9D90 pD2C0 y01A0A0C183".., 8192) = 8192 read(4, " a 7 ,87EDB01EF6C382D810".., 8192) = 8192 write(7, " a 7 ,87EDB01EF6C382D810".., 8192) = 8192 read(4, " z X Z d88D5 E92 X `E489".., 8192) = 8192 write(7, " z X Z d88D5 E92 X `E489".., 8192) = 8192 read(4, "A802 U GFFF6E9 e l9C KFF".., 1143) = 1143 write(7, "A802 U GFFF6E9 e l9C KFF".., 1143) = 1143 ioctl(1, TIOCGSID, 0xFFBEE7CC) = 0 getsid(0) = 8697 ioctl(1, TIOCGPGRP, 0xFFBEE834) = 0 ioctl(1, TIOCGWINSZ, 0xFFBEE890) = 0 testfile 100% |***************************************************** rite(1, "\r t e s t ...

What's wrong with strcpy/strcat in this "C for Tcl" experiment?
L.S. I'm doing some exercises in C for Tcl (still learning C). One thing I don't understand is why strcpy or strcat cause a segfault when loading the C-extension (see code below) into tclsh. When using the same calls to strcpy and strcat in a stand alone executable (not linked to Tcl), I do not stumble into this problem. Apparently, there is something wrong with the way that I combine these fuctions with Tcl. Could somebody please explain why strcpy or strcat cause problems in my code ? I've been using gcc on Linux and tcl8.4.5 Thanks in advance, Erik Leunissen ===========...

TCL 8.5.6 invalid command name "clock"
Hello, I running a c++ application with an Tcl 8.5.5. interpreter. Now I try to update TCL to version 8.5.6. While running the application with TCL 8.5.6 I get the following error: invalid command name "clock" while executing "clock seconds" Is there something I might have overseen, or is this a bug in version 8.5.6. Thank you for help in advance. Kind Regards sindbad0815@googlemail.com wrote: > I running a c++ application with an Tcl 8.5.5. interpreter. Now I try > to > update TCL to version 8.5.6. While running the application with TCL > 8.5.6 I get the following error: > > invalid command name "clock" > while executing > "clock seconds" > > Is there something I might have overseen, or is this a bug in version > 8.5.6. Within that program, what value is returned from the Tcl_Init() call? -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter@nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |______________________________________________________________________| On 16 Mrz., 16:38, Don Porter <d...@nist.gov> wrote: > sindbad0...@googlemail.com wrote: > > I running a c++ application with an Tcl 8.5.5. interpreter. Now I try > > to > > update TCL to version 8.5.6. While running the application =A0with TCL > > 8.5.6 I get the following e...

What's wrong with this: street_n=addr1_1|" "||addr2||" "||addr3||" "||addr4||" "||addr5
Hi, I wanted to remove the first zero from 0416 E. BAILEY 101, but not from 0 S 356 MADISON. I ran the following code and I have problem with the line: ------------------------ street_n=addr1_1|" "||addr2||" "||addr3||" "||addr4||" "||addr5; ---------------------- My desired output is something like this under one single variable "street_n": 416 E. BAILEY 101 0S356 MADISON Hope to get some help from out there. Thanks, Duckhye. data a; input street $1-19; cards; 0416 E. BAILEY 101 0 S 356 MADISON ; run; data b;set a; addr1=put(left(scan...

"Tcl/Tk 8.5 tutorial"
All the documentation at http://tcl.tk/man/ is available as *html.tar.gz except "Tcl/Tk 8.5 tutorial". Is there a reason or just an accident of history. I have ActiveTcl installed and its associated ActiveTclHelp8.6.chm . This trifocal wearing senior citizen finds it impossible to read comfortably. I prefer HTML as I have my browser configured for legibility. I wish to have the tutorial available on my machine. >=20 > I have ActiveTcl installed and its associated=20 > ActiveTclHelp8.6.chm . This trifocal wearing senior citizen finds=20 > it impossible to read comfortably. I prefer HTML as I have my=20 > browser configured for legibility. I wish to have the tutorial=20 > available on my machine. A solution is to put the pages on your PC using httrack : http://www.httrac= k.com/page/1/en/index.html. After installation and having given a "project = name" and the path of a directory of your choice ( ex : xyz ) just then po= int the address to http://tcl.tk/man/tcl8.5/tutorial/tcltutorial.html . Lau= nch it . At the end, it will last a few minutes, you will see a file "index= ..html" in "xyz" directory . And... just doubleclick and here you are... It is web copier that you can use for a set of pages. The default settings = are such that you will download the necessary pages, not all the website, w= hich is not legal I think.=20 Olivier. On 3/11/2016 9:18 AM, Olivier wrote: >>...

tcl 8.5.2 gives error on runtime arg "-c"
Hi. I'm getting this error when launching a tcl script from a shell with "-c some_argument" with tcl 8.5.2 Application initialization failed: bad window path name "some_argument" I've searched the manpage and several documentation sources and have not found any restrictions over supplying runtime flag/arguments. Is this a bug or a hidden feature? dewuf wrote: > Hi. I'm getting this error when launching a tcl script from a shell > with "-c some_argument" with tcl 8.5.2 > > Application initialization failed: bad window path name > "some_argument" > > I've searched the manpage and several documentation sources and have > not found any restrictions over supplying runtime flag/arguments. Is > this a bug or a hidden feature? see http://www.tcl.tk/man/tcl8.5/UserCmd/wish.htm use a -- to prevent the interp from even looking at the options Bruce On Feb 9, 2:36=A0pm, Bruce Hartweg <Bruce-DoNot...@example.com> wrote: > dewuf wrote: > > Hi. =A0I'm getting this error when launching a tcl script from a shell > > with "-c some_argument" with tcl 8.5.2 > > > Application initialization failed: bad window path name > > "some_argument" > > > I've searched the manpage and several documentation sources and have > > not found any restrictions over supplying runtime flag/arguments. =A0Is > > this a bug or a hidden featu...

Tcl 8,5 tutorial errata on page "More Examples Of Regular Expressions"
Hi, In the Tcl 8.5 tutorial, a page titled "More Examples Of Regular Expressions" may contain errata in the following Tcl code: " set string "Again and again and again ..." if { [regexp {(\y\w+\y).+\1} $string => word] } { puts "The word $word occurs at least twice" } " You can see that the command 'regexp' sets a value into a variable called '=>'. This can be proved by executing the following code: " set string "Again and again and again ..." if { [regexp {(\y\w+\y).+\1} $string => word] } { puts "The word $word occurs at least twice" } upvar #0 "=>" x puts "$x" " I guess that the author meant to write something else? It doesn't make sense to have a variable named "=>". Here's a link to the relevant page in the tutorial: http://www.tcl.tk/man/tcl8.5/tutorial/Tcl20a.html Thank you. On Tuesday, 12 November 2013 08:43:08 UTC+11, dor...@gmail.com wrote: > Hi, >=20 >=20 >=20 > In the Tcl 8.5 tutorial, a page titled "More Examples Of Regular Expressi= ons" may contain errata in the following Tcl code: >=20 >=20 >=20 > " >=20 >=20 >=20 > set string "Again and again and again ..." >=20 > if { [regexp {(\y\w+\y).+\1} $string =3D> word] } { >=20 > puts "The word $word occurs at least twic...

Windows 8 -- "disjointed" "schizophrenic"
The conclusion of the article on Windows 8... ~~ There are two franchises about which most folks who have known me for any duration of time will conclude I am a loyal fan, despite all the headaches and the miserable episodes. But between Windows 8 and the 2009 Star Trek movie, it is the latter which displays the greatest continuity with its predecessors. And that is saying something. There is a new, vast, and potentially loyal group of users who are just now being introduced to a higher plane of technology by way of tablets and multitouch PCs. If Microsoft seriously intends to meet these new users with a schizophrenic, disjointed, loose assembly of dead ends that is anywhere near the state of the current Windows 8 Consumer Preview, then it will lose those users and it will never get them back. This is where the future of Windows either finally comes together or completely falls apart. ~~ http://snipurl.com/22nmew7 What a mess. -- RonB Registered Linux User #498581 CentOS 5.7 or VectorLinux Deluxe 6.0 or Linux Mint 10 RonB wrote this copyrighted missive and expects royalties: > The conclusion of the article on Windows 8... > > ~~ > There are two franchises about which most folks who have known me for any > duration of time will conclude I am a loyal fan, despite all the headaches > and the miserable episodes. But between Windows 8 and the 2009 Star Trek > movie, it is the latter which displays the greatest continuity with its > pre...

Binary reader speed comparison
I have a fairly simple binary reader proc that exhibits massive speed differences between Tcl 8.5.8 and Tcl8.6b1.1. Here's the proc: proc readFormatted {filename} { set fd [ open $filename r ] fconfigure $fd -encoding binary -translation binary binary scan [ read $fd 2 ] cc type nextlen if {$type != 75} { return -error "File is not in the expected format" } while {![append buffer [read $fd $nextlen] ; eof $fd]} { binary scan [read $fd 2] cc lastlen nextlen # convert to unsigned value set nextlen ...

FAQ 8.33 Is there a way to hide perl's command line from programs such as "ps"? #8
This is an excerpt from the latest version perlfaq8.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 8.33: Is there a way to hide perl's command line from programs such as "ps"? First of all note that if you're doing this for security reasons (to avoid people seeing passwords, for example) then yo...

Re: What's wrong with this: street_n=addr1_1|" "||addr2||" "||addr3||" "||addr4||" "||addr5
Dear Dyang, You have this street_n=addr1_1|" "||addr2||" "||addr3||" "||addr4||" "||addr5 ; But I think you want this street_n=addr1_1||" "||addr2||" "||addr3||" "||addr4||" "||addr5; HTH, Charles Patridge "Charles Patridge" <charles_s_patridge@PRODIGY.NET> wrote in message news:200403041919.i24JJEo15087@listserv.cc.uga.edu... > Dear Dyang, > > You have this > > street_n=addr1_1|" "||addr2||" "||addr3||" "||addr4||" "||addr5 ; > > B...

Tcl 8.4 regexp bug ("can't happen -- you found a bug")
Howdy, The following regsub command causes the above error message in Tcl 8.4: regsub {(^|\n)+\.*b} \n.b "" tmp There's probably room for argument about whether the expression is malformed. But in that case, it should probably say "quantifier operand invalid" rather than "you found a bug". Good luck, -Jonathan Jones According to Jonathan Jones <googlegroups@spitzensparken.com>: :The following regsub command causes the above error message Stop by the SourceForge project and submit a bug report on it. -- <URL: http://wiki.tcl.tk/ > In Go...

Re: What's wrong with this: street_n=addr1_1|" "||addr2||" "||addr3||" "||addr4||" "||addr5 #4
Thank you for the code. That's what I really wanted to see. I have some problem in understanding the code: particularly, ` '0'* <^w ?*> from your code rx = rxparse("` '0'* <^w ?*> to =1"); I know the tag expression and *, but I do not understand the rest characters. Can you explain it for me? Many thanks, Duckhye >>> "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM> 03/04/04 01:36PM >>> On Thu, 4 Mar 2004 12:55:20 -0600, Duck-Hye Yang <dyang@CHAPINHALL.ORG> wrote: >Hi, >I wanted to remove the first zero ...

[ info exists varName ] returns "" on Tcl 8.4.4 ... we're losing our sanity here
Hello, We're using "Tcl 8.4.4.0 Solaris/SPARC" .... pretty darned old version, I know ... but we have no choice as our program doesn't work well with newer versions. Anyway, we keep getting an error that we all used to think was simply impossible ... namely [ info exists ] not returning zero or non-zero but simply returning an empty string: can't use empty string as operand of "!" while executing "if { ! [ info exists ::varName ] } { return }" (procedure "debugOut" line 3) invoked from within "debugOut -g 9 "Entered function."" (procedure "programExit" line 3) invoked from within "programExit 0" How the heck is this even possible?? Is this a bug in Tcl? I don't see how anything we could do could ever cause [ info exists ] to return an empty string! Regards, Markus On Jun 22, 5:51=A0pm, antred <Nut...@gmx.net> wrote: > Hello, > > We're using "Tcl 8.4.4.0 Solaris/SPARC" .... pretty darned old > version, I know ... but we have no choice as our program doesn't work > well with newer versions. > > Anyway, we keep getting an error that we all used to think was simply > impossible ... namely [ info exists ] not returning zero or non-zero > but simply returning an empty string: > > can't use empty string as operand of "!" > =A0 =A0 while executing > "if { ! [ info exists ::var...

3 problems with "A small editor in 8.5.0" ( http://wiki.tcl.tk/20542)
I'm using Tcl/Tk 8.6.4 under WinXP Pro. Problem 1. I don't see any where to specify desired font. There is a code fragment saying ----------- proc textfenster {mframe {master {}}} { if {$master eq {}} { text [set mframe].t -bg white -xscrollcommand [ ---------------------------- which I edited to be ----------- proc textfenster {mframe {master {}}} { if {$master eq {}} { text [set mframe].t -font "Courier 20" -bg white -xscrollcommand [ ---------------------------- It made no difference. Problem 2. Although moving the butto...

BWidget tree can't be "packed" in latest tcl/tk (8.6.b1.1)
With windows (2k/xp) and 8.6b1 tcl/tk in a tclkit my code works. I just found a newer tclkit, 8.6b1.1 and the below test code is now suddenly broken. It gets an error on the second pack statement: "cannot use geometry manager pack inside .wtree_top.sw which already has slaves managed by grid" Is there a new restriction (or one that is now enforced) that has recently been added that causes this to break? It would be a rather sad development if I could no longer use BWidget trees with the pack manager. -------------------------------------- I built my own tclk...

FAQ 8.33 Is there a way to hide perl's command line from programs such as "ps"? #10
This is an excerpt from the latest version perlfaq8.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 8.33: Is there a way to hide perl's command line from programs such as "ps"? First of all note that if you're doing this for security reasons (to avoid people seeing passwords, for example) then yo...

FSF freaks: "Today's action is the beginning of a new FSF campaign around Windows 8..."
http://www.fsf.org/news/activists-trick-or-treat-for-free-software-at-windows-8-launch-event-1 Why don't you weirdos campaign around a bathtub and shaving kit? ...

"pipe" in Tcl 8.5ff
Hi, I am looking for a replacement of the "pipe" command of tclx. This command creates a FIFO and returns one fd for reading and one for writing. A similar command in C is #include <unistd.h> int pipe(int pipefd[2]); How do I do that with plain Tcl (version >= 8.5)? Best regards Ole Στις 8/8/2013 2:38 μμ, ο/η Olе Streicher έγραψε: > Hi, > > I am looking for a replacement of the "pipe" command of tclx. This > command creates a FIFO and returns one fd for reading and one for > writing. A similar command in C is > > #include <unistd.h> > int pipe(int pipefd[2]); > > How do I do that with plain Tcl (version >= 8.5)? > > Best regards > > Ole > In tcl 8.6, with the "chan pipe" command. In tcl 8.5, with the tclpipe extension: http://wiki.tcl.tk/21637 If you need this for executing commands, see the man page for "open" and possibly "exec". George Hi George, George Petasis <petasisg@yahoo.gr> writes: > Στις 8/8/2013 2:38 μμ, ο/η Olе Streicher έγραψε: >> I am looking for a replacement of the "pipe" command of tclx. > In tcl 8.6, with the "chan pipe" command. In tcl 8.5, with the tclpipe > extension: > > http://wiki.tcl.tk/21637 Is there a way to do it in plain tcl, without the need to compile an external package? > If you need this for executing commands, ...

There's "Unix", and then there's "UNIX(r)"
From TOW[1]: The Open Group, an industry standards consortium, now owns the UNIX trademark and allows its use for certified operating systems compliant with its standard, the Single UNIX Specification. Other operating systems that emulate Unix to some extent may be called Unix-like, although the Open Group disapproves of this term.[4] The term Unix is also often used informally to denote any operating system that closely resembles the trademarked system. The most common version of Unix (bearing certification) is Apple's OS X, while Linux is the most popular non-certified workalike. So, to summarize: "Unix" is a class of operating systems that is "UNIX-like", which includes Linux. "UNIX(r)" is a trademark of the Open group, who -- somewhat snootily -- have an issue with the term "UNIX-like". (They can take a flying fsck.) "Cult of Unix" spells "Unix" as "Unix", because otherwise, what would it have to do with Linux? This PSA brought to you by the letter "U" and the number "2". -v Unix minions, unite! On 2/9/14, 1:15 PM, in article ld8nlg$bu7$1@dont-email.me, "vallor" <vallor@cultnix.org> wrote: > From TOW[1]: > > The Open Group, an industry standards consortium, now owns the UNIX > trademark and allows its use for certified operating systems > compliant with its standard, the Single UN...

Web resources about - What's wrong with "fconfigure stdout -encoding utf-8" on windows in Tcl 8.5.10 - comp.lang.tcl

Resources last updated: 3/13/2016 10:26:47 AM