This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

lists

Old posts that have not been replied to for several years.
Locked
S
Snapple
Voice
Posts: 38
Joined: Fri Jul 18, 2003 4:41 pm
Location: Israel
Contact:

lists

Post by Snapple »

I have a list,
Does the list item have to be in english?
because if I make the item list, a chan in hebrew for example
after I set it
it says it's not existed
(info exists returns no)
anyone know what todo?=\

thanks
Snapple
There are 10 kind of people here, the one's who know binary code and the one's who don't.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Lists can contain anything you like.
Show us your code (the part that doesn't work)
S
Snapple
Voice
Posts: 38
Joined: Fri Jul 18, 2003 4:41 pm
Location: Israel
Contact:

hmm

Post by Snapple »

Code: Select all

if {![info exists ibhops($chan)]} { return 0 }
if $chan is a channel in hebrew, it will always return 0.
Snapple
There are 10 kind of people here, the one's who know binary code and the one's who don't.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Where's that list of yours?

Post by user »

Snapple wrote:

Code: Select all

if {![info exists ibhops($chan)]} { return 0 }
if $chan is a channel in hebrew, it will always return 0.
Where is 'chan' and 'ibhops($chan)' set?
S
Snapple
Voice
Posts: 38
Joined: Fri Jul 18, 2003 4:41 pm
Location: Israel
Contact:

hmm

Post by Snapple »

chan is a var we get from a line the egg get
and ibhops is from a file
Snapple
There are 10 kind of people here, the one's who know binary code and the one's who don't.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: hmm

Post by user »

Try this (not tested):

Code: Select all

proc source2 {file {encoding iso8859-8}} {
  set f [open $file]
  fconfigure $f -translation binary
  set s [read $f]
  close $f
  eval [encoding convertfrom $encoding $s]
}

source2 your_script.tcl
(replace 'source your_script.tcl' with the above line after adding the proc to your conf)

This might work..if it doesn't: what encoding are you using when creating the file? what's your system encoding? ('.tcl encoding system')
S
Snapple
Voice
Posts: 38
Joined: Fri Jul 18, 2003 4:41 pm
Location: Israel
Contact:

eh

Post by Snapple »

I use source file.tcl...
what should I do then?
Snapple
There are 10 kind of people here, the one's who know binary code and the one's who don't.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: eh

Post by user »

Snapple wrote:I use source file.tcl...
what should I do then?
Read my previous post?
S
Snapple
Voice
Posts: 38
Joined: Fri Jul 18, 2003 4:41 pm
Location: Israel
Contact:

hmm

Post by Snapple »

not working
Snapple
There are 10 kind of people here, the one's who know binary code and the one's who don't.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: hmm

Post by user »

Snapple wrote:I use source file.tcl...
That's not what I told you to do...if

Code: Select all

source2 file.tcl
doesn't work, try

Code: Select all

source2 file.tcl utf-8
S
Snapple
Voice
Posts: 38
Joined: Fri Jul 18, 2003 4:41 pm
Location: Israel
Contact:

hmm

Post by Snapple »

The problem isn't so much in the file, as if in the var itself...
Snapple
There are 10 kind of people here, the one's who know binary code and the one's who don't.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: hmm

Post by user »

Snapple wrote:The problem isn't so much in the file, as if in the var itself...
So the var doesn't come from the file?

http://www.google.com/search?q=clue :roll:

I could prove you wrong with one line of code, but why bother? You're the expert, right?
Locked