🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.tcl
Article #454

Re: Maly problem ze string match

#454
From: Googie
Date: Wed, 07 Feb 2007 23:46
30 lines
1769 bytes
Tomasz Motyliński wrote:

> Za kolorki daje kopniaka, za znaki w CP1250 już nie i nie mam pojęcia
> dlaczego. Kody pl literek się zgadzają i wykonywane są kolejne
> elseif'y więc przechodzi przez to (nie zgłasza żadnych błędów). Może
> mi ktoś pomóć?

Nie jestem tego pewny, ale wydaje mi się, że to jest tak, że te kody
polskich znaków są brane z CP1250, a Tcl używa kodowania UTF-8, więc
tam kody tych znaków są inne.

Najlepiej zrób sobie małego debuga, wyświetlaj w konsoli eggdropa (np
dccbroadcast) coś takiego:

set output "$txt | hex:"
foreach c [split $txt ""] {
    binary scan $c h* h
    if {$::tcl_platform(byteOrder) == "littleEndian"} {
        set h [string index $h 1][string index $h 0]
    }
    append output " $h"
}
dccbroadcast $output

To wyświetli Ci w konsoli bota teskt z kanału i zraz po nim kody hex
kolejnych znaków. W ten sposób wytestujesz jakich kodów używac.

-- 
Pozdrawiam (Regards)!
Googie
Technical Details
Message-ID: <eqdkv9$ev5$1@nemesis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <eqd10s$npo$1@news.telbank.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: Googie <googie@nospam.0rg>
Newsgroups: pl.comp.lang.tcl
Subject: Re: Maly problem ze string match
Date: Wed, 07 Feb 2007 23:46:10 +0000
Organization: tp.internet - http://www.tpi.pl/
Lines: 30
Message-ID: <eqdkv9$ev5$1@nemesis.news.tpi.pl>
References: <eqd10s$npo$1@news.telbank.pl>
NNTP-Posting-Host: cafemax.eu.org
Mime-Version: 1.0
X-Trace: nemesis.news.tpi.pl 1170888489 15333 85.128.51.194 (7 Feb 2007 22:48:09 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Wed, 7 Feb 2007 22:48:09 +0000 (UTC)
User-Agent: KNode/0.10.4
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit