Page 1 of 1 1
Topic Options
#75292 - 2003-06-05 11:03 AM Kix32 & wget
Stefan Olsson Offline
Fresh Scripter

Registered: 2003-06-05
Posts: 11
Loc: Sweden
Hi. I use a kix32-script to set a number of parameters which are run by wget.exe. It works fine, but wget can´t read the swedish characters å,ä and ö
ex
.....
$COMMAND="SetUser.aspx?id="+@USERID+"&computer="+@WKSTA+"&name=Örbän Åhlünge"
.....
SHELL $WGET+'"'+$APPSERVER+$COMMAND+'"'

In the cmd-window for wget.exe the following appears:
.... setuser.aspx?id=p44son&computer=kalles&name=%D&rb%E4%20%C5hl%FCnge

wget ignors the swedish characters.

Anyone knows any solution concerning this? Either changing in kix32-script or by using something else than wget?

Most thankfull for help
Stefan

[ 05. June 2003, 11:09: Message edited by: Stefan Olsson ]

Top
#75293 - 2003-06-05 11:41 AM Re: Kix32 & wget
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
they are scandinavian characters [Wink]
what you are using wget for?
_________________________
!

download KiXnet

Top
#75294 - 2003-06-05 11:53 AM Re: Kix32 & wget
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
first of all...
are you using it for files or documents?

then, what kixtart version you use?
what os and browser and it's version?

finally, basically url's don't support those characters but you can indeed code them in pretty easily.
_________________________
!

download KiXnet

Top
#75295 - 2003-06-06 12:13 AM Re: Kix32 & wget
Stefan Olsson Offline
Fresh Scripter

Registered: 2003-06-05
Posts: 11
Loc: Sweden
I use wget to easyly get data from kix32 to an accessdb on a webserver. When the asp.net code gets the data, åll the SCANDINAVIAN characters are gone. I use wget from 2003-05-19 (latest)and winXp / 2000 on the workstations
Top
#75296 - 2003-06-06 12:20 AM Re: Kix32 & wget
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
kixtart version?
you get it easily by doing a script like:
code:
 @kix get $  

and executing it.
if you have nt versions 5.0 and 5.1 I assume you also have ie version higher than 5.0 so you can skip the wget totally.

this script will do the exact same (output to console):
code:
$web=createobject("microsoft.xmlhttp")
$web.open("GET","http://my_url/SetUser.aspx?id="+@USERID+"&computer="+@WKSTA+"&name=Örbän Åhlünge", not 1)
$web.send

$response_from_web = $web.responsebody

"retrieved data:" ?
$response_from_web

this assumes you have at least 4.00 version of kixtart.
_________________________
!

download KiXnet

Top
#75297 - 2003-06-06 12:21 AM Re: Kix32 & wget
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
oh, and like said before.
url may need to be encoded...
not sure how well IE automatically translates the characters.
if this does not work fully, say so.
will give you encoding code then too.
_________________________
!

download KiXnet

Top
#75298 - 2003-06-06 12:40 AM Re: Kix32 & wget
Stefan Olsson Offline
Fresh Scripter

Registered: 2003-06-05
Posts: 11
Loc: Sweden
This was extreamly intresting... But I have 3.60 Maybe I should upgrade [Embarrassed] )
Thanks

Top
#75299 - 2003-06-05 01:04 PM Re: Kix32 & wget
Stefan Olsson Offline
Fresh Scripter

Registered: 2003-06-05
Posts: 11
Loc: Sweden
Updated. ver 4.21
No errormess, but alas no respons from web... Where can I read more about the microsoft.xmlhttp-object?

Top
#75300 - 2003-06-05 01:14 PM Re: Kix32 & wget
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
basically nowhere [Big Grin]
msdn has some IIS based docs which are not really helpfull as most of the stuff does not work with this.
then on the web there is one or two places which say to provide info but actually their info is really basic.

first, you might try this other one.
if the data is long, kixtart string manipulation limits come to play so you can't thus display it.
the limit was something like 30k.

with this you can see does it get anything.
if it does not, there may be other errors like wrong addy or similar.

but, try this and report back does it worky:
$web=createobject("microsoft.xmlhttp")
$web.open("GET","http://my_url/SetUser.aspx?id="+@USERID+"&computer="+@WKSTA+"&name=Örbän Åhlünge", not 1)
$web.send
$response = $web.responsebody

if len($response)
"retrieved data:" ?
for each $line in split($response,chr(10)
$line ?
next
else
"no response."
endif

_________________________
!

download KiXnet

Top
#75301 - 2003-06-05 02:48 PM Re: Kix32 & wget
Stefan Olsson Offline
Fresh Scripter

Registered: 2003-06-05
Posts: 11
Loc: Sweden
Hi! Now it worked, but as bad as wget... Sorry. But I think I might replace wget with this anyway!
Top
#75302 - 2003-06-05 08:19 PM Re: Kix32 & wget
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k...
you say that as bad as.
you probably will need to replace all scandinavian characters with their ascii-code.

thus you could use something similar to:
code:
$address="what.ever.with.scandies.in/it/mjölk"
$replace_these="å","Å","ö","Ö","ä","Ä"
"address is at start:" ?
$address
? "these characters will be replaced with URI-code:" ?
$replace_these
?
for each $char in $replace_these
"."
$address=join(split($address,$char),"%#"+asc($char)+";")
next
? "address after conversion:" ?
$address

this is not perfect as put it together on the fly...
but something similar.
_________________________
!

download KiXnet

Top
#75303 - 2003-06-06 07:11 AM Re: Kix32 & wget
Stefan Olsson Offline
Fresh Scripter

Registered: 2003-06-05
Posts: 11
Loc: Sweden
ABSOLUTELY ASTONISHING!!
Thanks a lot! I was afraid I had to do something like this, but I´m not that advanced in Kix so I was a bit worried about where to begin.

Thanx again. I'm impressed!
//Stefan
btw, you don't speak swedish?

Top
#75304 - 2003-06-06 08:15 AM Re: Kix32 & wget
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
have studied it for about 6 years because our stupid government wanted me to [Wink]

indeed I don't remember lot more than el-piano from my 7th grade [Big Grin]

well, it's pretty easy to listen to and even understand that language...
_________________________
!

download KiXnet

Top
#75305 - 2003-06-06 08:53 AM Re: Kix32 & wget
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
stefan, looked for some old code of mine...
and found one:
http://www.gwspikval.com/jooel/scripts/bbChecker/sources/urlencode.udf

it says that it needs to be:
"%%"+dectohex(asc($char))

as it's address entry it indeed must be hex-number and it has no html-marks like "#" or ";"
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 664 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.072 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org