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.

writing and variants

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
Arnold_X-P
Master
Posts: 261
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

writing and variants

Post by Arnold_X-P »

What would be correct in these two variants, the use or method of UTF?

Code: Select all

 putserv [encoding convertfrom utf-8 "PRIVMSG $chan :$text"]
   puthelp [encoding convertto utf-8 "PRIVMSG $chan :$text"]


And regarding this second question, this variant that I use at the moment works well for me, any suggestions on this second point?

Code: Select all

 set copycom [encoding convertfrom utf-8 [lrange [split $horoscopo] 1 end]]  
   puthelp "PRIVMSG $chan :-=\00312$text=-:$copycom" -next
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
networks: DALnet #tcls ChatZona #tcl Libera.Chat #tcls
p
pektek
Halfop
Posts: 76
Joined: Sat Jul 01, 2023 4:51 pm
Location: TURKEY
Contact:

Re: writing and variants

Post by pektek »

Code: Select all

proc say_fast {chan text} {
    putserv [encoding convertfrom utf-8 "PRIVMSG $chan :$text"]
}

proc say_safe {chan text} {
    puthelp [encoding convertto utf-8 "PRIVMSG $chan :$text"]
}
proc say {chan text} {
    puthelp [encoding convertto utf-8 "PRIVMSG $chan :$text"]
} 
or try this

Code: Select all

proc say_fast {chan text} {
    putserv "PRIVMSG $chan :$text"
}

proc say_safe {chan text} {
    puthelp "PRIVMSG $chan :$text"
}

proc say {chan text} {
    say_safe $chan $text
}
Post Reply