f



How can I use tcl to read files written in GBK or GB18030 encoding?

I know that Tcl has quite a large list of encodings that it supports.
However, I've a request for guidance by someone who needs to read
files using either GBK or GB18030 (I think these are alternate names
for the same encoding...).

Has anyone worked out what one needs to do for this?
0
lvirden (1938)
1/31/2008 3:26:43 PM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

12 Replies
615 Views

Similar Articles

[PageSpeed] 13

On 31 Jan., 16:26, "Larry W. Virden" <lvir...@gmail.com> wrote:
> I know that Tcl has quite a large list of encodings that it supports.
> However, I've a request for guidance by someone who needs to read
> files using either GBK or GB18030 (I think these are alternate names
> for the same encoding...).
>
> Has anyone worked out what one needs to do for this?

From Wikipedia I see that GB18030 has a structure vaguely similar to
UTF-8, but more complicated:

1st byte 00..7F: ASCII, 1 byte
             81..FE: 2nd byte 40..FE: GB2312 Chinese character, 2
bytes
                                      30..39:  Extended character, 4
bytes

Extended characters have ranges 81..FE 30..39 81..FE 30..39, with
which all Unicode points are represented that aren't in ASCII or
GB2312. The relation between Unicode and Extended cannot be computed,
but must come from a lookup table.

The difference between GB18030 and GBK is trifle and concerns only the
Euro sign: 0x80 in Microsoft's later versions of GBK and a two byte
code of A2 E3 in GB18030.

http://en.wikipedia.org/wiki/GB_18030 has a link to the "authoritative
mapping table".

Whether Tcl's encoding mechanism can deal with this 1/2/4 byte pattern
directly (so that only an .enc file would have to be produced), I
can't tell. As last resort one might always implement the decision
mechanism sketched above, and use a 2-byte and a 4-byte lookup table.
0
1/31/2008 3:50:48 PM
Larry W. Virden wrote:
> I know that Tcl has quite a large list of encodings that it supports.
> However, I've a request for guidance by someone who needs to read
> files using either GBK or GB18030 (I think these are alternate names
> for the same encoding...).
>
> Has anyone worked out what one needs to do for this?
According to Wikipedia ( http://en.wikipedia.org/wiki/GB_18030 ) its
an encoding mandating support for non BMP characters. As Tcl currently
only supports the BMP your out of luck if you need full compliance.
But you might be able to get support for the BMP part of the encoding.

But you might come up with a limited mapping file to feed to the Tcl
encoding system (like those in the Tcl source dirs, there is some tool
in the tools/ subdir to convert the unicode.org txt files to Tcl enc
files). After that you need to put the enc File in the right places
(or register them later like the various texts for starkits describe
it).

Michael
0
schlenk (1615)
1/31/2008 3:51:57 PM
Larry W. Virden wrote:
> I know that Tcl has quite a large list of encodings that it supports.
> However, I've a request for guidance by someone who needs to read
> files using either GBK or GB18030 (I think these are alternate names
> for the same encoding...).
> 
> Has anyone worked out what one needs to do for this?

If there is documentation for the format of the encoding as a map to
unicode characters, you can do it.  The only thing you need to make is
the "compiler" with source for the map compiler located as
/tools/encoding/txt2enc.c

The readme in that directory explains it, and just seems incredibly
simple to do:

"
On Unix, use "make" to compile all the encoding files (*.txt,*.esc)
into the format that Tcl can use (*.enc).  It is the caller's
responsibility to move the generated .enc files to the appropriate
place (the $TCL_LIBRARY/encoding directory).
"

I can't describe the format of the mappings infile, but should be
straight from the unicode standard.

Looks to be a simple matter of:
1) get or create the mapping infile
2) build txt2enc.c
3) compile the mapping outfile into a .enc
4) move the .enc to where $TCL_LIBRARY/encoding resides
5) start tclsh and call 'encoding names' and observe your new addition
5) ???
6) make lots of money!

I wouldn't be surprised if the mapping infile exits already on
www.unicode.org somewhere for you to download...

ftp://ftp.unicode.org/Public/MAPPINGS/
0
davygrvy (1376)
1/31/2008 4:02:50 PM
iconv handles these two encodings, so you might be able just to run
iconv as a child process. Failing that, the iconv source may be
helpful.
0
billposer (379)
2/1/2008 6:01:43 AM
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigBE048FC9BC70578872AEC126
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

billposer@alum.mit.edu wrote:
> iconv handles these two encodings, so you might be able just to run
> iconv as a child process. Failing that, the iconv source may be
> helpful.

How is Tcl to handle the code-points in the 4-byte region, though?  I=20
didn't know it went outside USC-2.

I'll be watching this thread as I'd like to know how this resolves.


--------------enigBE048FC9BC70578872AEC126
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkek2fgACgkQlZadkQh/RmHhMgCg2Cg5Ezmcaewp73IG0ti/kHGg
YZsAnjjRzDo+WiKqZxG5f3leVfzxi0AO
=O39y
-----END PGP SIGNATURE-----

--------------enigBE048FC9BC70578872AEC126--
0
davygrvy (1376)
2/2/2008 9:00:26 PM
On Feb 2, 1:00 pm, David Gravereaux <davyg...@pobox.com> wrote:
> billpo...@alum.mit.edu wrote:
> > iconv handles these two encodings, so you might be able just to run
> > iconv as a child process. Failing that, the iconv source may be
> > helpful.
>
> How is Tcl to handle the code-points in the 4-byte region, though?  I
> didn't know it went outside USC-2.


Tcl as it is usually compiled can't handle the codepoints beyond the
BMP, so the output of iconv would have to be filtered. An alternative
is to compile Tcl to handle full Unicode. If the application is plain
Tcl, that is, does not use Tk, that should work.
0
billposer (379)
2/3/2008 5:25:19 AM
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig3CEAB20F4A59DA7BA1C295A6
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

billposer@alum.mit.edu wrote:
> On Feb 2, 1:00 pm, David Gravereaux <davyg...@pobox.com> wrote:
>> billpo...@alum.mit.edu wrote:
>>> iconv handles these two encodings, so you might be able just to run
>>> iconv as a child process. Failing that, the iconv source may be
>>> helpful.
>> How is Tcl to handle the code-points in the 4-byte region, though?  I
>> didn't know it went outside USC-2.
>=20
>=20
> Tcl as it is usually compiled can't handle the codepoints beyond the
> BMP, so the output of iconv would have to be filtered. An alternative
> is to compile Tcl to handle full Unicode. If the application is plain
> Tcl, that is, does not use Tk, that should work.


Is it just that easy to add -DTCL_UTF_MAX=3D6 when you compile the core t=
o=20
get it to work for UCS-4?

I look at line 2122 in tcl.h and I see: "UCS-4 is experimental and not=20
recommended." and makes me question how easy it really is to get=20
surrogate support.

We should wait for Jeff or Kevin to chime in here.


--------------enig3CEAB20F4A59DA7BA1C295A6
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkelb5oACgkQlZadkQh/RmFitQCg+R0iBlXhO1ByoQbUgue+LDG4
GrIAoJZq0dTDI8b4AOaozqSA8vUUmtbR
=PZYN
-----END PGP SIGNATURE-----

--------------enig3CEAB20F4A59DA7BA1C295A6--
0
davygrvy (1376)
2/3/2008 7:38:52 AM
On Feb 2, 11:38 pm, David Gravereaux <davyg...@pobox.com> wrote:

> Is it just that easy to add -DTCL_UTF_MAX=6 when you compile the core to
> get it to work for UCS-4?
>
> I look at line 2122 in tcl.h and I see: "UCS-4 is experimental and not
> recommended." and makes me question how easy it really is to get
> surrogate support.

For details, I agree that it would be a good idea to hear from one of
the core team. I did try compiling Tcl for full Unicode a couple years
ago, and it passed my basic tests. I didn't pursue this, though,
because it didn't do me much good without Tk also supporting full
Unicode.
0
billposer (379)
2/3/2008 6:02:03 PM
I should add that I have real experience with the other approach I
mentioned, namely filtering. My uninum library (http://wiki.tcl.tk/
17692), which converts between numerals in most known writing systems
and integers, generates output that may include characters outside the
BMP when going from integers to strings. Most of the numeral systems
are entirely within the BMP, but a few are outside. The Tcl interface
code checks whether each character in the output string is within the
BMP. If it isn't, it passes to Tcl a string consisting of just a
Unicode Replacement Character and sets an error flag. (The Tcl program
should be checking this flag anyhow since there are various other
conditions that could result in a failed conversion, e.g. a request
for output in an unsupported numeral system or input of an integer
outside the range supported by the numeral system.)
0
billposer (379)
2/3/2008 6:10:46 PM
David Gravereaux wrote:
> I look at line 2122 in tcl.h and I see: "UCS-4 is experimental and not 
> recommended." and makes me question how easy it really is to get 
> surrogate support.
> 
> We should wait for Jeff or Kevin to chime in here.
> 

There are a fair number of places in the code where there is an
incorrect assumption that Tcl_UniChar and the native wchar_t are
one and the same, or that UCS-2 and UTF-16 are one and the same.
The UCS-4 definitions break the code near near these
interfaces.  I'm afraid that tracking all of them down and
replacing them may well prove to be a bit of a slog.
I seem to recall that the regexp engine also stumbles when
asked to deal with non-UCS-2 characters.

Given the amount of grunt work that would be needed to audit
the code, my personal belief is that the most effective way
forward would be to replace the String internal representation
with an index structure for locating the byte offset for
a character count. Even the regex engine could be adapted
to that sort of structure (although the implementation of
'.' and '[^...]' gets a trifle ugly, it's doable).  But
I've surely not had the time to take it on.

There's still a lot of other i18n work to be done.  I'd see
an extension beyond the BMP as only one of several big
projects; another is bidi and combining forms for Tk.
(I'd really, really like to see Tk able to display Hebrew,
Aramaic and Syriac with vowel points...)  I suspect that
we could borrow substantially from ICU4C as we attack
this one.

-- 
73 de ke9tv/2, Kevin
0
kennykb (564)
2/3/2008 7:20:42 PM
On Feb 3, 12:25=A0am, billpo...@alum.mit.edu wrote:
> Tcl as it is usually compiled can't handle the codepoints beyond the
> BMP, so the output of iconv would have to be filtered. An alternative
> is to compile Tcl to handle full Unicode. If the application is plain
> Tcl, that is, does not use Tk, that should work.

Interesting note. After passing along the early part of this thread,
the developer asked me why, after converting the text via iconv, Tcl/
Tk 8.4.7 was core dumping with the converted text! I suspect that this
"filtering" is probably something that is needed.

When he moved to using Tcl/Tk 8.5, he no longer was getting core
dumps, but he WAS getting strange characters displayed (they were
boxes of "dots" in various formations...).

0
lvirden (1938)
2/4/2008 12:42:20 PM
The "filtering" is really very simple. If you are using iconv via the
underlying library, get the result as an array of 32 bit integers and
check to see if any exceed 0xFFFF. If none do, convert down to 16
bits.  If there are any codepoints outside the BMP, do whatever is
appropriate for an error. If calling iconv as a child process,
basically the same thing can be done, though the data conversion would
actually be a little more complicated.
0
billposer (379)
2/4/2008 6:16:30 PM
Reply:

Similar Artilces:

how can i read the last line of a file using tcl console commands???
hi, all, i want to read some thing from an increasing file which was written from another procedure by the same time, how can i do that?? Thankyou ! best regards Ning. PH.D.Condidater.Li.Ning wrote: > hi, > all, > i want to read some thing from an increasing file which was written > from another procedure by the same time, > how can i do that?? > > Thankyou ! > best regards > > Ning. > see http://wiki.tcl.tk/tail and related pages linked there. Bruce In article <1190213992.898044.6150@y27g2000pre.googlegroups.com>, PH.D.Condidater.Li.Ning <nealleehit@gmail.com> wrote: >hi, >all, >i want to read some thing from an increasing file which was written >from another procedure by the same time, . . . <URL: http://wiki.tcl.tk/tail > ...

How to read a file using TCL
Hi, I am a new bee to TCL. I want to write a script that opens the file and reads it and prints to screen. I have tried the below. But doesn't works. set INFILE [open "temp" a+] set data [read $INFILE] set data [split $data "\n"] foreach line $data { puts $line } -Regards Swaroop Kumar Tata On 14 Mai, 10:39, Swaroop <swaroop.t...@gmail.com> wrote: > Hi, > I am a new bee to TCL. I want to write a script that opens the > file and reads it and prints to screen. I have tried the below. But > doesn't works. > > set INFILE [open "temp" a+] You're opening in "a" (append) mode, that is, the file pointer puts at the end. As you want to read the file, why not use mode "r", which is default anyway? So just do set INFILE [open temp] On May 14, 2:20 pm, suchenwi <richard.suchenwirth- bauersa...@siemens.com> wrote: > On 14 Mai, 10:39, Swaroop <swaroop.t...@gmail.com> wrote: > > > Hi, > > I am a new bee to TCL. I want to write a script that opens the > > file and reads it and prints to screen. I have tried the below. But > > doesn't works. > > > set INFILE [open "temp" a+] > > You're opening in "a" (append) mode, that is, the file pointer puts at > the end. As you want to read the file, why not use mode "r", which is > default anyway? So just do > set INFILE [o...

Sourcing a TCL file from within a tcl file
I am a newbie which I am sure I don't need to state :) I am trying to create a variable with a TCL file that will source another tcl file when I type the variable name something like this if I enter A through my keyboard then source a.tcl Can someone show me how to do this thanks guy On Dec 10, 1:15=A0pm, guy <gcoletta2...@gmail.com> wrote: > I am a newbie which I am sure I don't need to state :) > > I am trying to create a variable with a TCL file that will source > another tcl file when I type the variable name > > something like this > > if I enter A through my keyboard =A0then source a.tcl > > Can someone show me how to do this > > thanks > guy What you are asking is not hard. Will your program have a graphical user interface? Aric On Dec 10, 3:26=A0pm, Aric Bills <aric.bi...@gmail.com> wrote: > On Dec 10, 1:15=A0pm, guy <gcoletta2...@gmail.com> wrote: > > > I am a newbie which I am sure I don't need to state :) > > > I am trying to create a variable with a TCL file that will source > > another tcl file when I type the variable name > > > something like this > > > if I enter A through my keyboard =A0then source a.tcl > > > Can someone show me how to do this > > > thanks > > guy > > What you are asking is not hard. =A0Will your program have a graphical > user interface? > > Aric no I am just using this script...

Why can execution results in tcl shell differ than if using tcl script??
Hi, I have been posting a thread here: http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/983d7ef3e4b1ab54# I have another question that might be related to it, I'm doing set of tcl commands (involving external shell commands execution) one time in tcl shell, and the other from a tcl script.. Although both command sequences are the same, I get quite different results!!! Why did this happens?? Thanks, Ahmad Ahmad wrote: > Hi, > > I have been posting a thread here: > http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/983d7ef3e4b1ab54# > > I have another question that might be related to it, I'm doing set of > tcl commands (involving external shell commands execution) one time in > tcl shell, and the other from a tcl script.. > > Although both command sequences are the same, I get quite different > results!!! Why did this happens?? > > Thanks, > Ahmad The interactive Tcl shell has access to external functionality that a running script doesn't. That's done to make the interactive environment easier to work with. What, specifically, is the command sequence you're issuing in both cases? Jeff Hi Jeff, Thank you for your reply. I've a tcl script that finally creates a certain script, that is when I run from shell using "calibredrv -gui <certainRunScript>" from command line it do exactly what I expect. I have tried two scenarios of trials, and only one of...

How to read an Excel file using TCL Scripts
Hi all, I have an excel file test.xls.It is created manually and few values are added manually. I Want to read each column of the excel and store in some variable using TCL Scripts. I went thro lot of examples but nothing related to above requirement I found. Please give suggestions or links where this code is given. Thanks in Advance, RAGHU On 25 =D0=BD=D0=BE=D1=8F, 12:55, RAGHU <ragh...@gmail.com> wrote: > I Want to read each column of the excel and store in some variable > using TCL Scripts. Open http://wiki.tcl.tk/tcom and search for "Extract some cells from an Excel file". On 25 Nov., 10:55, RAGHU <ragh...@gmail.com> wrote: > Hi all, > > I have an excel file test.xls.It is created manually and few values > are added manually. > > I Want to read each column of the excel and store in some variable > using TCL Scripts. > > I went thro lot of examples but nothing related to above requirement I > found. > > Please give suggestions or links where this code is given. > > Thanks in Advance, > RAGHU This question was here 1 or two months ago. Check the mailing list or search in the wiki. hi Raghu, Save the excel file into csv format... thsi will then give you a comma separated values... since it is separated by comma you can use the tcl comman to "split". split "\n" string to split per row.. split "," string to split per co...

Problem using grep command in tcl and reading multiple files
Hi All, I am a newbie to tcl and i am having problem performing some of basic operations using tcl. I am having a centralized location in server where i am large number of directories with all user logins and each directory is having some log files with *.log extension. My requirement is to identify directories with my login id and then go into each directory and append all the information available in *.log files into one file. Problem 1: For identifying directory name with my login, i am using exec ls | grep <USERNAME> But it is returning "child process exited abnormally" If i run exec ls only, it lists down all the directories. What is wrong with "exec ls | grep <USERNAME>" Other related question, in tcl is there any inbuilt command that can be used to grep directories with a particular login like file command? Problem2: Other question is regarding opening multiple files and dumping in one file. I am trying following code set file_handle [open "*.log" "r"] But is giving error. So i think i should do it like set list_dir [glob *.log] foreach file_name $list_dir { set file_handle [open $file_name "r"] lappend list_var [reads $file_handle] close $file_handle } Is this the only way to do it, is there any shortcut to do it like in unix we can do "cat *.log > filename" in tcl? Thanks At Wed, 25 May 2011 07:16:34 -0700 (PDT) sunny <techbie.wordpress@gmail.com> wrote: > >...

can you run e commerce site using just tcl 8.6.2 and a pure tcl webserver?
and have decent performance? ...

can we auto indent a tcl file already written without indentation
Hi all, I work in UNIX environment.. Can we auto indent a Tcl file which was written without proper indentation. Like we have an 'indent' tool in UNIX which is capable of indenting .c and .h files, Do we have any tool to indent TCL script files. Thanks in advance.!!! Ravikanth emacs can indent tcl code. Just open the file in emacs, set point at the begining, move to the end, and execute ESC-x indent-region. Oops. I meant "set the mark at the beginning". or use Vim: go to top and press =G At 2008-11-07 01:56AM, "Ravikanth" wrote: > Hi all, > > I work in UNIX environment.. > > Can we auto indent a Tcl file which was written without proper > indentation. > > Like we have an 'indent' tool in UNIX which is capable of indenting .c > and .h files, > > Do we have any tool to indent TCL script files. frink -- http://wiki.tcl.tk/2611 I invoke it like 'frink -egINnz' to beautify my tcl. -- Glenn Jackman Write a wise saying and your name will live forever. -- Anonymous ...

how to read file in tcl
in the condition that giving some coordinate of polygon in a directory and i have to read these file without using the command create poly how to call these file from the directory? In article <36940419.0308110031.66a5cd1@posting.google.com>, K Zewi <prowarcraftplayer@yahoo.com> wrote: >in the condition that >giving some coordinate of polygon >in a directory and i have to >read these file without using >the command create poly >how to call these file >from the directory? Did you ever get the help you sought? My guess is that readers found your question...

read file in tcl
how to read or call a file in tcl ? davidw@dedasys.com (David N. Welton) wrote in message news:<873cg837s7.fsf@dedasys.com>... > prowarcraftplayer@yahoo.com (K Zewi) writes: > > > how to read or call a file in tcl ? > > 'call' a file? > > Reading a file can be done with the 'read' command: > > set fl [open "somefile"] > set data [read $fl] > > is a simple way to do it. You want to look at the documents for those > commands, and maybe 'fconfigure' if you want to read a binary file. i still can't read ...

Can I compile a tcl/tk extended C file into an exe file on windows?
I'm new to tcl/tk. I have a simple tk/tcl extended C file like this, #include <stdio.h> #include <stdlib.h> #include <tcl.h> #include <tk.h> int Tcl_AppInit(Tcl_Interp* interp) { int status; status = Tcl_Init(interp); if (status != TCL_OK) { return TCL_ERROR; } /* Initialize Tk values. */ status = Tk_Init(interp); if (status != TCL_OK) { return TCL_ERROR; } return TCL_OK; } int main(int argc, char** argv) { Tk_Main(argc, argv, Tcl_AppInit); return 0; } Can I compile this file into an exe file on windows? How? Thank you ysrise@gmail.com (yan) writes: [snip[ ...

Using TCL files in Python ?
I am reasonably new to programming in Python. [Using LINUX] Up until now I have been using GUI widgets supplied by 'Tkinter' but starting to realise that Tkinter have limited widgets. I have been given the lead that I should look at other sources for GUI widgets - namely TCL. I have just done a search for 'tcl' files on my 'Fedora 3' installation and find I have available: Tix8.1 Tcl8.4 Tk8.4 I have never used TCL code under Python so I assume I can use widgets from any of these providers ? Where is a good resource I can use to help understand how to use TCL...

tcl-pam: PAM authentication for Tcl (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-pam Tcl-pam is a Tcl interface to the PAM* service of Linux. It provides a Tcl package that allows Tcl scripts to use PAM to authenticate users and programs. It relies on linux-pam library: http://www.kernel.org/pub/linux/libs/pam/ * PAM (Pluggable Authentication Modules): A mechanism to integrate multiple low−level authentication schemes into a high−level application programming interface (API). This enables programs that rely on authentication to be written independently of the underlying authentication scheme. Platform: Linux Home page: http://sourceforge.net/projects/tcl-pam/ Man page: http://tcl-pam.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

In Tcl and C++ code, how to use Tcl Command, such as exit?
In my code, i used Tcl_SetStdChannel(0, STDIN) and a thread to control all input and output from Tcl, but i want to use some of Tcl' Commands, such as, exit. I used Tcl_Eval() then, but the Tcl command seem invisible in my code, I typed a string in command prompt, such as "AAAAA", and Enter, got nothing feedback. How can i do to get these Tcl Commands work? Thanx! vian1381@china.com.cn wrote: > In my code, i used Tcl_SetStdChannel(0, STDIN) and a thread to control > all input and output from Tcl, but i want to use some of Tcl' Commands, > such as, exit. > > I used Tcl_Eval() then, but the Tcl command seem invisible in my code, > I typed a string in command prompt, such as "AAAAA", and Enter, got > nothing feedback. Your questions are hard to understand, but they suggest that you believe that setting a custom stdin channel will do some magic to establsh a prompt/read/eval loop. That is not the case. > How can i do to get these Tcl Commands work? Start with something that works, like the source code for tclsh, and adapt to your needs. Or post a followup and include more code examples to explain what you're doing and how it doesn't do what you expect. -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter@nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |_____________________________________...

tcl-gaul: Genetic Algorithms for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-gaul Tcl-gaul is a Tcl extension for genetic/evolutionary algorithm processing.It relies on the GAUL library: http://gaul.sourceforge.net/ * A genetic algorithm (GA) is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. They are a particular class of evolutionary algorithms that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover. For an introduction to genetic algorithms visit: http://gaul.sourceforge.net/intro.html Platform: Linux (GAUL library dependency) Home page: http://sourceforge.net/projects/tcl-gaul/ Man page: http://tcl-gaul.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

Dose there any tcl script to translate an file with embedded tcl
Hi I need to generate some big file, but there are rules for generate these files Ex . ============================== Start input a [0] wire input a [1] wire .. .. .. .. input a [1000] wire End ================================= Dose there any tcl script can help to translate a file with embedded tcl script into a new file For example this is a source file ======================== Start * set i 0 * for { set i 0 } { $i < 1000 } { incr i } { * puts input a [$i] wire * } End ========================== After Translate ======================= Start input a [0] wire input a [1] wire .. .. ...

Will tcl 9 use epoll or kqueue for tcl?
curious http://luvit.io/ also check this out for web stuff done in lua but perhaps tcl can steal nice ideas On Wednesday, January 2, 2013 3:22:02 PM UTC-8, gavino_himself wrote: > curious > > > > http://luvit.io/ also check this out for web stuff done in lua but perhaps tcl can steal nice ideas cherokee uses them so gota be ast for events and cherokee outperforms nginx ...

tcl code to read an image and write tcl code?
Does anyone know where I can find a tcl proc that would take an image, say a gif, and output pure tcl code that I could paste into a program? I saw something about a unix program that did something with mimes but I'm on windows. In article <4403BC94.447A7341@rocketship1.com>, Eric Taylor <et2@rocketship1.com> wrote: > > >Does anyone know where I can find a tcl proc >that would take an image, say a gif, and output >pure tcl code that I could paste into a program? > >I saw something about a unix program that did >something with mimes but I'm on wi...

Tcl+incr Tcl debuggers to use on command line?
Hi, Does anyone know of incr Tcl supported debuggers that work on command line? That is, without needing bundling with IDEs? Thanks On 10/11/14, 9:46 PM, kenneth.bull@gmail.com wrote: > Hi, > > Does anyone know of incr Tcl supported debuggers that work on command line? > That is, without needing bundling with IDEs? Well, the debugger in ActiveState's TDK does not need a bundled IDE and it works with [incr Tcl] -- but it is a GUI application not a command line one. -- +------------------------------------------------------------------------+ | Gerald W. L...

Read block of file in Tcl
Hi, I have an input file in the following format: ******************************** Name1 Name2 Row1 DEF 001 Row2 ABC DEG 003 Row3 EW EW 002 Row4 FF 0012 Row1 ADEF 1001 Row2 ARBC DEG 2003 Row3 EWW EW 0302 Row4 AB 0112 Name1 Name2 Row1 DSDEF 001 Row2 ABVC DEG 003 Row3 EDW EW 002 Row4 FVF 0012 Row1 AF 1001 Row2 ACRBC DEG 2003 Row3 ESWW EW 0302 Row4 AEB 0112 **************************************** I have to read this file and --> if I get "Name1" in any of the line, then I have to read the block of file from "Name1" to the first occurrance of "Row4". --> I...

read an XML file in TCL
Hello I am looking to read an XML file into my TCL program and extract information. How do we read an XML file in TCL? Are there man pages that describe these? Thanks krithiga one way is: http://wiki.tcl.tk/tdom another (and faster, but should be used only for valid stuff) is http://wiki.tcl.tk/11020 Torsten Edler wrote: > another (and faster, but should be used only for valid stuff) is > I'm curious as to this assertion that the shallow regexp parser is faster than tdom, I would have expected things to be the other way around. Do you have a benchmark? Were you testing...

Reading a tcl file in C
I have a tcl configure file (a list of variables with values and comments) that I wish to read into an array in C (or better yet, Objective-C). Does anyone have any suggestions of how to do this, or have any public-domain or GPL code that does this? randall.h.wood@gmail.com wrote: > I have a tcl configure file (a list of variables with values and > comments) that I wish to read into an array in C (or better yet, > Objective-C). Does anyone have any suggestions of how to do this, or > have any public-domain or GPL code that does this? Can you give us a short example of what this file will look like? -- +--------------------------------+---------------------------------------+ | Gerald W. Lester | |"The man who fights for his ideals is the man who is alive." - Cervantes| +------------------------------------------------------------------------+ On Mar 13, 9:02 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote: > randall.h.w...@gmail.com wrote: > > I have a tcl configure file (a list of variables with values and > > comments) that I wish to read into an array in C (or better yet, > > Objective-C). Does anyone have any suggestions of how to do this, or > > have any public-domain or GPL code that does this? > > Can you give us a short example of what this file will look like? > I apologize for the delayed response. EXAMPLE FOLLOWS: # Set the dire...

How to open a logical partition and read all of its file using windows function ReadFile() ? Question How to open a logical partition and read all of its file using windows function ReadFile() ?
Hii In my application , wanna copy all files from one partition to another partition. First I copied a file that I taken default and copied to another partition. The above operation is done by using the control code "FSCTL_GET_RETRIEVAL_POINTERS". The clusters used are read and wrote into destination volume using readfile() and writefile() windows functions. Now I gotta copy all files..... So how to proceed ....?? Thanking you. On Sat, 13 Jun 2009 09:37:42 -0700 (PDT), krish <krishnampkkm@gmail.com> wrote: >Hii > >In my applicatio...

ow can i use fgets to read and ignore the first two lines of a file and output into another file
Novice programmer needs help with using fgets to read and ignore the first two lines of a file. I've gone thru the previous posting regarding fgets, but none of them seems to help my situation. I have airdata file that i have to read, but in other teh fscanf to work properly, i need to ignore the first two lines, because scanf does not read spaces. This is what my current code looks like #include <stdio.h> #include <sting.h> #include <stdlib.h> int main() { FILE * AirFile; //the file that contains the data to be read FILE *textFile; //the out file for both...

Web resources about - How can I use tcl to read files written in GBK or GB18030 encoding? - comp.lang.tcl

Encoding (memory) - Wikipedia, the free encyclopedia
Visual, acoustic, and semantic encodings are the most intensively used. Other encodings are also used. Acoustic encoding is the encoding of auditory ...

Twitter image encoding challenge
If a picture's worth 1000 words, how much of a picture can you fit in 140 characters? Note : That's it folks! Bounty deadline is here, and after ...

【medical-news】Genetic Variation in NR1H4 Encoding the Bile Acid Receptor FXR - 医药生命科学动态跟踪 -丁香园论坛
Context: Bile acid signaling via farnesoid X receptor (FXR) regulates glucose and lipid levels, fat mass, and hepatic steatosis in animal models.Objective: ...

HandBrake Open Source video transcoder v0.10 released with hundreds of new features including H.265 and ...
... can be used for transcribing many different types of files/codecs to almost any other. Today’s headliner updates include H.265 and VP8 encoding. ...

CJK Type - CJK Fonts, Character Sets & Encodings. All CJK. All of the time.
As I wrote nearly a year ago , the Adobe-Identity-0 ROS is useful for building special-purpose fonts, especially CJK ones whose glyph coverage ...

Link Encoding Goes Mobile With Deep Links From Bitly
... Facebook and Google have been competing to bring the best solution for tracking deeplinks . This week, Bitly announced its own linking encoding ...

Encoding Articles - AppAdvice iPhone/iPad News
Latest Encoding Articles - AppAdvice iPhone/iPad News

AirMovie - Enjoy the videos in your PC anytime, anywhere with NO ENCODING!!
Holen Sie sich „AirMovie - Enjoy the videos in your PC anytime, anywhere with NO ENCODING!!“ im App Store. Sehen Sie sich Screenshots, Bewertungen ...

More tips on encoding video for Apple TV and iPod, from us to you
Apple tells video podcasters how to encode their content, which is also useful …

Handbrake 0.9.6 gives some, takes some encoding features
The Handbrake Project has announced an update to its open-source, cross-platform video transcoding utility. Handbrake 0.9.6 includes new and ...

Resources last updated: 3/13/2016 1:18:21 PM